diff options
| -rw-r--r-- | cocoa/ScintillaCocoa.mm | 4 | ||||
| -rw-r--r-- | include/Scintilla.h | 4 | ||||
| -rw-r--r-- | include/Scintilla.iface | 4 | ||||
| -rw-r--r-- | include/ScintillaTypes.h | 4 | ||||
| -rw-r--r-- | src/EditView.cxx | 8 | ||||
| -rw-r--r-- | src/Editor.cxx | 2 | ||||
| -rw-r--r-- | src/ViewStyle.cxx | 10 | 
7 files changed, 18 insertions, 18 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 1164b7253..81e31d9aa 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -2572,7 +2572,7 @@ void ScintillaCocoa::UpdateBaseElements() {  			NSColor *modified = [selBack blendedColorWithFraction:0.5 ofColor:textBack];  			changed = vs.SetElementBase(Element::SelectionBack, ColourFromNSColor(selBack));  			changed = vs.SetElementBase(Element::SelectionAdditionalBack, ColourFromNSColor(modified)) || changed; -			changed = vs.SetElementBase(Element::SelectionNoFocusBack, ColourFromNSColor(noFocusBack)) || changed; +			changed = vs.SetElementBase(Element::SelectionInactiveBack, ColourFromNSColor(noFocusBack)) || changed;  		} else {  			// Less translucent colour used in dark mode as otherwise less visible  			const int alpha = textBack.brightnessComponent > 0.5 ? 0x40 : 0x60; @@ -2581,7 +2581,7 @@ void ScintillaCocoa::UpdateBaseElements() {  			const ColourRGBA colourAccent = ColourFromNSColor(accent);  			changed = vs.SetElementBase(Element::SelectionBack, ColourRGBA(colourAccent, alpha));  			changed = vs.SetElementBase(Element::SelectionAdditionalBack, ColourRGBA(colourAccent, alpha/2)) || changed; -			changed = vs.SetElementBase(Element::SelectionNoFocusBack, ColourRGBA(ColourFromNSColor(noFocusBack), alpha)) || changed; +			changed = vs.SetElementBase(Element::SelectionInactiveBack, ColourRGBA(ColourFromNSColor(noFocusBack), alpha)) || changed;  		}  	} diff --git a/include/Scintilla.h b/include/Scintilla.h index 8d2a11cb1..a9ce7184c 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -281,8 +281,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,  #define SC_ELEMENT_SELECTION_ADDITIONAL_BACK 13  #define SC_ELEMENT_SELECTION_SECONDARY_TEXT 14  #define SC_ELEMENT_SELECTION_SECONDARY_BACK 15 -#define SC_ELEMENT_SELECTION_NO_FOCUS_TEXT 16 -#define SC_ELEMENT_SELECTION_NO_FOCUS_BACK 17 +#define SC_ELEMENT_SELECTION_INACTIVE_TEXT 16 +#define SC_ELEMENT_SELECTION_INACTIVE_BACK 17  #define SC_ELEMENT_CARET 40  #define SC_ELEMENT_CARET_ADDITIONAL 41  #define SC_ELEMENT_CARET_LINE_BACK 50 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 7ec3e9e7b..5a2e20feb 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -688,8 +688,8 @@ val SC_ELEMENT_SELECTION_ADDITIONAL_TEXT=12  val SC_ELEMENT_SELECTION_ADDITIONAL_BACK=13  val SC_ELEMENT_SELECTION_SECONDARY_TEXT=14  val SC_ELEMENT_SELECTION_SECONDARY_BACK=15 -val SC_ELEMENT_SELECTION_NO_FOCUS_TEXT=16 -val SC_ELEMENT_SELECTION_NO_FOCUS_BACK=17 +val SC_ELEMENT_SELECTION_INACTIVE_TEXT=16 +val SC_ELEMENT_SELECTION_INACTIVE_BACK=17  val SC_ELEMENT_CARET=40  val SC_ELEMENT_CARET_ADDITIONAL=41  val SC_ELEMENT_CARET_LINE_BACK=50 diff --git a/include/ScintillaTypes.h b/include/ScintillaTypes.h index 5b9b8023f..a964baa81 100644 --- a/include/ScintillaTypes.h +++ b/include/ScintillaTypes.h @@ -171,8 +171,8 @@ enum class Element {  	SelectionAdditionalBack = 13,  	SelectionSecondaryText = 14,  	SelectionSecondaryBack = 15, -	SelectionNoFocusText = 16, -	SelectionNoFocusBack = 17, +	SelectionInactiveText = 16, +	SelectionInactiveBack = 17,  	Caret = 40,  	CaretAdditional = 41,  	CaretLineBack = 50, diff --git a/src/EditView.cxx b/src/EditView.cxx index 3ba7b8560..2774d5f2e 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -840,8 +840,8 @@ ColourRGBA SelectionBackground(const EditModel &model, const ViewStyle &vsDraw,  		element = Element::SelectionAdditionalBack;  	if (!model.primarySelection)  		element = Element::SelectionSecondaryBack; -	if (!model.hasFocus && vsDraw.ElementColour(Element::SelectionNoFocusBack)) -		element = Element::SelectionNoFocusBack; +	if (!model.hasFocus && vsDraw.ElementColour(Element::SelectionInactiveBack)) +		element = Element::SelectionInactiveBack;  	return vsDraw.ElementColour(element).value_or(bugColour);  } @@ -854,8 +854,8 @@ std::optional<ColourRGBA> SelectionForeground(const EditModel &model, const View  	if (!model.primarySelection)	// Secondary selection  		element = Element::SelectionSecondaryText;  	if (!model.hasFocus) { -		if (vsDraw.ElementColour(Element::SelectionNoFocusText)) { -			element = Element::SelectionNoFocusText; +		if (vsDraw.ElementColour(Element::SelectionInactiveText)) { +			element = Element::SelectionInactiveText;  		} else {  			return {};  		} diff --git a/src/Editor.cxx b/src/Editor.cxx index 29f79e16c..ab09f3f2d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7512,7 +7512,7 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {  			vs.SetElementAlpha(Element::SelectionBack, alpha);  			vs.SetElementAlpha(Element::SelectionAdditionalBack, alpha);  			vs.SetElementAlpha(Element::SelectionSecondaryBack, alpha); -			vs.SetElementAlpha(Element::SelectionNoFocusBack, alpha); +			vs.SetElementAlpha(Element::SelectionInactiveBack, alpha);  			InvalidateStyleRedraw();  		}  		break; diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 8340cd68f..a7e8ba8fe 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -204,12 +204,12 @@ void ViewStyle::Init(size_t stylesSize_) {  	elementColours.erase(Element::SelectionText);  	elementColours.erase(Element::SelectionAdditionalText);  	elementColours.erase(Element::SelectionSecondaryText); -	elementColours.erase(Element::SelectionNoFocusText); +	elementColours.erase(Element::SelectionInactiveText);  	// Shades of grey for selection backgrounds  	elementBaseColours[Element::SelectionBack] = ColourRGBA(0xc0, 0xc0, 0xc0, 0xff);  	elementBaseColours[Element::SelectionAdditionalBack] = ColourRGBA(0xd7, 0xd7, 0xd7, 0xff);  	elementBaseColours[Element::SelectionSecondaryBack] = ColourRGBA(0xb0, 0xb0, 0xb0, 0xff); -	elementBaseColours[Element::SelectionNoFocusBack] = ColourRGBA(0x80, 0x80, 0x80, 0x3f); +	elementBaseColours[Element::SelectionInactiveBack] = ColourRGBA(0x80, 0x80, 0x80, 0x3f);  	elementAllowsTranslucent.insert({  		Element::SelectionText,  		Element::SelectionBack, @@ -217,9 +217,9 @@ void ViewStyle::Init(size_t stylesSize_) {  		Element::SelectionAdditionalBack,  		Element::SelectionSecondaryText,  		Element::SelectionSecondaryBack, -		Element::SelectionNoFocusText, +		Element::SelectionInactiveText,  		Element::SelectionBack, -		Element::SelectionNoFocusBack, +		Element::SelectionInactiveBack,  	});  	selection.layer = Layer::Base;  	selection.eolFilled = false; @@ -520,7 +520,7 @@ bool ViewStyle::SelectionTextDrawn() const {  		ElementIsSet(Element::SelectionText) ||  		ElementIsSet(Element::SelectionAdditionalText) ||  		ElementIsSet(Element::SelectionSecondaryText) || -		ElementIsSet(Element::SelectionNoFocusText); +		ElementIsSet(Element::SelectionInactiveText);  }  bool ViewStyle::WhitespaceBackgroundDrawn() const {  | 
