aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r--src/ViewStyle.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 9d9fd6712..58af810b8 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -487,6 +487,10 @@ bool ViewStyle::SelectionBackgroundDrawn() const noexcept {
((selection.alpha == SC_ALPHA_NOALPHA) || (selection.additionalAlpha == SC_ALPHA_NOALPHA));
}
+bool ViewStyle::SelectionTextDrawn() const {
+ return selection.colours.fore.has_value();
+}
+
bool ViewStyle::WhitespaceBackgroundDrawn() const noexcept {
return (viewWhitespace != WhiteSpace::invisible) && (whitespaceColours.back);
}
@@ -512,8 +516,8 @@ void ViewStyle::AddMultiEdge(uptr_t wParam, sptr_t lParam) {
EdgeProperties(column, lParam));
}
-std::optional<ColourAlpha> ViewStyle::ElementColour(int index) const {
- auto search = elementColours.find(index);
+std::optional<ColourAlpha> ViewStyle::ElementColour(int element) const {
+ ElementMap::const_iterator search = elementColours.find(element);
if (search != elementColours.end()) {
if (search->second.has_value()) {
return search->second;
@@ -522,8 +526,8 @@ std::optional<ColourAlpha> ViewStyle::ElementColour(int index) const {
return {};
}
-bool ViewStyle::ElementAllowsTranslucent(int index) const {
- return elementAllowsTranslucent.count(index) > 0;
+bool ViewStyle::ElementAllowsTranslucent(int element) const {
+ return elementAllowsTranslucent.count(element) > 0;
}
bool ViewStyle::SetWrapState(int wrapState_) noexcept {