From 1106a6251a38cd7efc035a362caf794d2a6eaa04 Mon Sep 17 00:00:00 2001 From: Lucas Trzesniewski Date: Thu, 6 Apr 2023 21:27:33 +0200 Subject: [PATCH] Align highlighted brackets border to whole pixels --- ILSpy/TextView/BracketHighlightRenderer.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ILSpy/TextView/BracketHighlightRenderer.cs b/ILSpy/TextView/BracketHighlightRenderer.cs index 9a61bce318..4b958d407a 100644 --- a/ILSpy/TextView/BracketHighlightRenderer.cs +++ b/ILSpy/TextView/BracketHighlightRenderer.cs @@ -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 ?? 0; builder.AddSegment(textView, new TextSegment() { StartOffset = result.OpeningBracketOffset, Length = result.OpeningBracketLength }); builder.CloseFigure(); // prevent connecting the two segments