aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/EditView.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-07-29 12:43:47 +1000
committerNeil <nyamatongwe@gmail.com>2021-07-29 12:43:47 +1000
commit57f5c36ccf0ddc9be4b348bbe39cf3347ea8381c (patch)
tree4819bc0d298973db57f6c16a5832baba7033ba93 /src/EditView.cxx
parent01b1affdce7ee869c62a88ab23486b55b7707764 (diff)
downloadscintilla-mirror-57f5c36ccf0ddc9be4b348bbe39cf3347ea8381c.tar.gz
Add SC_ELEMENT_FOLD_LINE to set the colour of fold lines.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r--src/EditView.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx
index f4d37e221..7eea729fd 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -2289,19 +2289,21 @@ static void DrawFoldLines(Surface *surface, const EditModel &model, const ViewSt
const FoldLevel levelNext = model.pdoc->GetFoldLevel(line + 1);
if (LevelIsHeader(level) &&
(LevelNumber(level) < LevelNumber(levelNext))) {
+ const ColourRGBA foldLineColour = vsDraw.ElementColour(Element::FoldLine).value_or(
+ vsDraw.styles[StyleDefault].fore);
// Paint the line above the fold
if ((subLine == 0) &&
((expanded && (FlagSet(model.foldFlags, FoldFlag::LineBeforeExpanded)))
||
(!expanded && (FlagSet(model.foldFlags, FoldFlag::LineBeforeContracted))))) {
- surface->FillRectangleAligned(Side(rcLine, Edge::top, 1.0), Fill(vsDraw.styles[StyleDefault].fore));
+ surface->FillRectangleAligned(Side(rcLine, Edge::top, 1.0), foldLineColour);
}
// Paint the line below the fold
if (lastSubLine &&
((expanded && (FlagSet(model.foldFlags, FoldFlag::LineAfterExpanded)))
||
(!expanded && (FlagSet(model.foldFlags, FoldFlag::LineAfterContracted))))) {
- surface->FillRectangleAligned(Side(rcLine, Edge::bottom, 1.0), Fill(vsDraw.styles[StyleDefault].fore));
+ surface->FillRectangleAligned(Side(rcLine, Edge::bottom, 1.0), foldLineColour);
}
}
}