From 2a32ab1ac379271dd1b526f5ff01a67118284e96 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 29 Jul 2021 12:25:43 +1000 Subject: Use Side call to reduce code. --- src/EditView.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/EditView.cxx b/src/EditView.cxx index e4b0fa5d9..ba1301d70 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -2291,17 +2291,13 @@ static void DrawFoldLines(Surface *surface, const EditModel &model, const ViewSt if ((expanded && (FlagSet(model.foldFlags, FoldFlag::LineBeforeExpanded))) || (!expanded && (FlagSet(model.foldFlags, FoldFlag::LineBeforeContracted)))) { - PRectangle rcFoldLine = rcLine; - rcFoldLine.bottom = rcFoldLine.top + 1; - surface->FillRectangleAligned(rcFoldLine, Fill(vsDraw.styles[StyleDefault].fore)); + surface->FillRectangleAligned(Side(rcLine, Edge::top, 1.0), Fill(vsDraw.styles[StyleDefault].fore)); } // Paint the line below the fold if ((expanded && (FlagSet(model.foldFlags, FoldFlag::LineAfterExpanded))) || (!expanded && (FlagSet(model.foldFlags, FoldFlag::LineAfterContracted)))) { - PRectangle rcFoldLine = rcLine; - rcFoldLine.top = rcFoldLine.bottom - 1; - surface->FillRectangleAligned(rcFoldLine, Fill(vsDraw.styles[StyleDefault].fore)); + surface->FillRectangleAligned(Side(rcLine, Edge::bottom, 1.0), Fill(vsDraw.styles[StyleDefault].fore)); } } } -- cgit v1.2.3