diff --git a/src/Consolonia.Core/Drawing/DrawingContextImpl.cs b/src/Consolonia.Core/Drawing/DrawingContextImpl.cs index 0230d727..826aaf18 100644 --- a/src/Consolonia.Core/Drawing/DrawingContextImpl.cs +++ b/src/Consolonia.Core/Drawing/DrawingContextImpl.cs @@ -266,8 +266,10 @@ public void DrawGeometry(IBrush brush, IPen pen, IGeometryImpl geometry) FillRectangleWithBrush(brush, pen, r); } - if (pen is null or { Thickness: 0 } - or { Brush: null }) return; + if (pen is null + or { Thickness: 0 } + or { Brush: null } + or { Brush: LineBrush { Brush: null } }) return; DrawBoxLineInternal(pen, new Line(r.TopLeft, false, (int)r.Width), RectangleLinePosition.Top); DrawBoxLineInternal(pen, new Line(r.BottomLeft, false, (int)r.Width), RectangleLinePosition.Bottom); DrawBoxLineInternal(pen, new Line(r.TopLeft, true, (int)r.Height), RectangleLinePosition.Left); diff --git a/src/Consolonia.Core/Drawing/LineBrush.cs b/src/Consolonia.Core/Drawing/LineBrush.cs index 990cd461..25e9d66b 100644 --- a/src/Consolonia.Core/Drawing/LineBrush.cs +++ b/src/Consolonia.Core/Drawing/LineBrush.cs @@ -9,7 +9,8 @@ public class LineBrush : Animatable, IImmutableBrush { //todo: we don't really implement immutable brush public static readonly StyledProperty BrushProperty = - AvaloniaProperty.Register(CommonInternalHelper.GetStyledPropertyName()); + AvaloniaProperty.Register( + CommonInternalHelper.GetStyledPropertyName() /*todo: re-use this method everywhere*/); public static readonly StyledProperty LineStyleProperty = AvaloniaProperty.Register(CommonInternalHelper.GetStyledPropertyName());