Skip to content

Commit

Permalink
Merge branch 'main' into cleanup-15-dec-2024
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlm authored Dec 15, 2024
2 parents cb705b5 + 0983f49 commit fb64bde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/Consolonia.Core/Drawing/DrawingContextImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/Consolonia.Core/Drawing/LineBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ public class LineBrush : Animatable, IImmutableBrush
{
//todo: we don't really implement immutable brush
public static readonly StyledProperty<IBrush> BrushProperty =
AvaloniaProperty.Register<LineBrush, IBrush>(CommonInternalHelper.GetStyledPropertyName());
AvaloniaProperty.Register<LineBrush, IBrush>(
CommonInternalHelper.GetStyledPropertyName() /*todo: re-use this method everywhere*/);

public static readonly StyledProperty<LineStyle> LineStyleProperty =
AvaloniaProperty.Register<LineBrush, LineStyle>(CommonInternalHelper.GetStyledPropertyName());
Expand Down

0 comments on commit fb64bde

Please sign in to comment.