aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/EditView.cxx
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2024-03-15 17:54:07 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2024-03-15 17:54:07 +1100
commitbb387ecf5a9a81723637a153896e4ee0eb16bbc8 (patch)
tree7de0a961b8571033c1c4a3ea10ac4b54f2a8fc5b /src/EditView.cxx
parent16f53f7b3f2f16f5caf62ae01d3e892d70f7d9ca (diff)
downloadscintilla-mirror-bb387ecf5a9a81723637a153896e4ee0eb16bbc8.tar.gz
Bug [#2417]. Add elements for inactive additional selections
SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT and SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r--src/EditView.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx
index b3e024fe1..5c88080a1 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -844,8 +844,13 @@ ColourRGBA SelectionBackground(const EditModel &model, const ViewStyle &vsDraw,
element = Element::SelectionAdditionalBack;
if (!model.primarySelection)
element = Element::SelectionSecondaryBack;
- if (!model.hasFocus && vsDraw.ElementColour(Element::SelectionInactiveBack))
- element = Element::SelectionInactiveBack;
+ if (!model.hasFocus) {
+ if ((inSelection == InSelection::inAdditional) && vsDraw.ElementColour(Element::SelectionInactiveAdditionalBack)) {
+ element = Element::SelectionInactiveAdditionalBack;
+ } else if (vsDraw.ElementColour(Element::SelectionInactiveBack)) {
+ element = Element::SelectionInactiveBack;
+ }
+ }
return vsDraw.ElementColour(element).value_or(colourBug);
}
@@ -858,7 +863,9 @@ ColourOptional SelectionForeground(const EditModel &model, const ViewStyle &vsDr
if (!model.primarySelection) // Secondary selection
element = Element::SelectionSecondaryText;
if (!model.hasFocus) {
- if (vsDraw.ElementColour(Element::SelectionInactiveText)) {
+ if ((inSelection == InSelection::inAdditional) && vsDraw.ElementColour(Element::SelectionInactiveAdditionalText)) {
+ element = Element::SelectionInactiveAdditionalText;
+ } else if (vsDraw.ElementColour(Element::SelectionInactiveText)) {
element = Element::SelectionInactiveText;
} else {
return {};