Skip to content

Commit

Permalink
Merge pull request AvaloniaUI#130 from whistyun/for-pr
Browse files Browse the repository at this point in the history
Change typecheck from SolidColorBrush to ISolidColorBrush
  • Loading branch information
danwalmsley authored Apr 26, 2021
2 parents 5856b95 + 6d3347e commit f29c6e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/AvaloniaEdit/Editing/CaretLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public override void Render(DrawingContext drawingContext)

if (_textArea.OverstrikeMode)
{
if (caretBrush is SolidColorBrush scBrush)
if (caretBrush is ISolidColorBrush scBrush)
{
var brushColor = scBrush.Color;
var newColor = Color.FromArgb(100, brushColor.R, brushColor.G, brushColor.B);
Expand Down
2 changes: 1 addition & 1 deletion src/AvaloniaEdit/Highlighting/HighlightingBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public abstract class HighlightingBrush
/// <param name="context">The construction context. context can be null!</param>
public virtual Color? GetColor(ITextRunConstructionContext context)
{
if (GetBrush(context) is SolidColorBrush scb)
if (GetBrush(context) is ISolidColorBrush scb)
return scb.Color;
return null;
}
Expand Down

0 comments on commit f29c6e2

Please sign in to comment.