aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-05-14 13:54:44 +1000
committerNeil <nyamatongwe@gmail.com>2021-05-14 13:54:44 +1000
commit17d2d5c793eaa95b170684213b18ff2e3f5ce291 (patch)
tree35f64342cf85c11800ae711c0def0a1be435d20b /src/ViewStyle.cxx
parentc173fc47fda7bb86399bd777540bb17f8e05172d (diff)
downloadscintilla-mirror-17d2d5c793eaa95b170684213b18ff2e3f5ce291.tar.gz
Add SC_ELEMENT_WHITE_SPACE_BACK to set the background colour of visible
whitespace.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r--src/ViewStyle.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 3785dec37..489758c71 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -108,7 +108,6 @@ ViewStyle::ViewStyle(const ViewStyle &source) : markers(MARKER_MAX + 1), indicat
textStart = source.textStart;
zoomLevel = source.zoomLevel;
viewWhitespace = source.viewWhitespace;
- whitespaceBack = source.whitespaceBack;
tabDrawMode = source.tabDrawMode;
whitespaceSize = source.whitespaceSize;
viewIndentationGuides = source.viewIndentationGuides;
@@ -265,7 +264,6 @@ void ViewStyle::Init(size_t stylesSize_) {
textStart = marginInside ? fixedColumnWidth : leftMarginWidth;
zoomLevel = 0;
viewWhitespace = WhiteSpace::invisible;
- whitespaceBack.reset();
tabDrawMode = TabDrawMode::longArrow;
whitespaceSize = 1;
elementColours.erase(SC_ELEMENT_WHITE_SPACE);
@@ -522,8 +520,8 @@ bool ViewStyle::SelectionTextDrawn() const {
ElementIsSet(SC_ELEMENT_SELECTION_NO_FOCUS_TEXT);
}
-bool ViewStyle::WhitespaceBackgroundDrawn() const noexcept {
- return (viewWhitespace != WhiteSpace::invisible) && (whitespaceBack);
+bool ViewStyle::WhitespaceBackgroundDrawn() const {
+ return (viewWhitespace != WhiteSpace::invisible) && (ElementIsSet(SC_ELEMENT_WHITE_SPACE_BACK));
}
bool ViewStyle::WhiteSpaceVisible(bool inIndent) const noexcept {
@@ -532,7 +530,7 @@ bool ViewStyle::WhiteSpaceVisible(bool inIndent) const noexcept {
viewWhitespace == WhiteSpace::visibleAlways;
}
-ColourAlpha ViewStyle::WrapColour() const noexcept {
+ColourAlpha ViewStyle::WrapColour() const {
return ElementColour(SC_ELEMENT_WHITE_SPACE).value_or(styles[STYLE_DEFAULT].fore);
}