aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-07-29 12:25:43 +1000
committerNeil <nyamatongwe@gmail.com>2021-07-29 12:25:43 +1000
commit2a32ab1ac379271dd1b526f5ff01a67118284e96 (patch)
tree86cef058de5e0edab186658bf1631ba59926bc11
parent6a83f1fc22a5dc0a65c7b7f7af81e753c557b25b (diff)
downloadscintilla-mirror-2a32ab1ac379271dd1b526f5ff01a67118284e96.tar.gz
Use Side call to reduce code.
-rw-r--r--src/EditView.cxx8
1 files changed, 2 insertions, 6 deletions
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));
}
}
}