Skip to content

Commit

Permalink
Updated deprecated usage of TextView `Redraw(ISegment, DispatcherPrio…
Browse files Browse the repository at this point in the history
…rity)` to only pass, `ISegment`. Updated deprecated usage of `ForegroundBrush` property to `SetForegroundBrush()` method.
  • Loading branch information
DamianSuess committed Sep 9, 2023
1 parent b1431d5 commit f6bc10e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ILSpy.Core/AvalonEdit/TextMarkerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ public void Remove(ITextMarker marker)
/// </summary>
internal void Redraw(ISegment segment)
{
textView.Redraw(segment, DispatcherPriority.Normal);
if (RedrawRequested != null)
RedrawRequested(this, EventArgs.Empty);
textView.Redraw(segment);
RedrawRequested?.Invoke(this, EventArgs.Empty);
}

public event EventHandler RedrawRequested;
Expand All @@ -137,7 +136,7 @@ protected override void ColorizeLine(DocumentLine line)
Math.Min(marker.EndOffset, lineEnd),
element => {
if (foregroundBrush != null) {
element.TextRunProperties.ForegroundBrush = foregroundBrush;
element.TextRunProperties.SetForegroundBrush(foregroundBrush);
}
// TODO: change font style
//string tf = element.TextRunProperties.Typeface;
Expand Down

0 comments on commit f6bc10e

Please sign in to comment.