Skip to content

Commit

Permalink
Align highlighted brackets border to whole pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
ltrzesniewski committed Apr 6, 2023
1 parent f5c49bf commit 8a7b3cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ILSpy/TextView/BracketHighlightRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ public void Draw(ICSharpCode.AvalonEdit.Rendering.TextView textView, DrawingCont
BackgroundGeometryBuilder builder = new BackgroundGeometryBuilder();

builder.CornerRadius = 1;
builder.AlignToWholePixels = true;
builder.BorderThickness = borderPen.Thickness;

builder.AddSegment(textView, new TextSegment() { StartOffset = result.OpeningBracketOffset, Length = result.OpeningBracketLength });
builder.CloseFigure(); // prevent connecting the two segments
Expand Down

0 comments on commit 8a7b3cc

Please # to comment.