From 81f7847af4cc9f51f02ab191c73f394c457518bd Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 25 Apr 2021 09:52:20 +1000 Subject: Feature [feature-requests:#1402]. Unify colour type with ColourAlpha. Change ColourDesired to ColourAlpha in styles. Remove ColourDesired. --- gtk/PlatGTK.cxx | 8 ++++---- gtk/ScintillaGTK.cxx | 8 ++++---- gtk/ScintillaGTKAccessible.cxx | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 4f06550a2..07a6f5539 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -2104,12 +2104,12 @@ void Menu::Show(Point pt, const Window &w) { #endif } -ColourDesired Platform::Chrome() { - return ColourDesired(0xe0, 0xe0, 0xe0); +ColourAlpha Platform::Chrome() { + return ColourAlpha(0xe0, 0xe0, 0xe0); } -ColourDesired Platform::ChromeHighlight() { - return ColourDesired(0xff, 0xff, 0xff); +ColourAlpha Platform::ChromeHighlight() { + return ColourAlpha(0xff, 0xff, 0xff); } const char *Platform::DefaultFont() { diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 7a1548be7..9846e197b 100755 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -693,10 +693,10 @@ void ScintillaGTK::Init() { timers[tr].reason = static_cast(tr); timers[tr].scintilla = this; } - vs.indicators[SC_INDICATOR_UNKNOWN] = Indicator(INDIC_HIDDEN, ColourDesired(0, 0, 0xff)); - vs.indicators[SC_INDICATOR_INPUT] = Indicator(INDIC_DOTS, ColourDesired(0, 0, 0xff)); - vs.indicators[SC_INDICATOR_CONVERTED] = Indicator(INDIC_COMPOSITIONTHICK, ColourDesired(0, 0, 0xff)); - vs.indicators[SC_INDICATOR_TARGET] = Indicator(INDIC_STRAIGHTBOX, ColourDesired(0, 0, 0xff)); + vs.indicators[SC_INDICATOR_UNKNOWN] = Indicator(INDIC_HIDDEN, ColourAlpha(0, 0, 0xff)); + vs.indicators[SC_INDICATOR_INPUT] = Indicator(INDIC_DOTS, ColourAlpha(0, 0, 0xff)); + vs.indicators[SC_INDICATOR_CONVERTED] = Indicator(INDIC_COMPOSITIONTHICK, ColourAlpha(0, 0, 0xff)); + vs.indicators[SC_INDICATOR_TARGET] = Indicator(INDIC_STRAIGHTBOX, ColourAlpha(0, 0, 0xff)); fontOptionsPrevious = FontOptions(PWidget(wText)); } diff --git a/gtk/ScintillaGTKAccessible.cxx b/gtk/ScintillaGTKAccessible.cxx index 9857db174..d5219aec8 100644 --- a/gtk/ScintillaGTKAccessible.cxx +++ b/gtk/ScintillaGTKAccessible.cxx @@ -524,7 +524,7 @@ static AtkAttributeSet *AddTextIntAttribute(AtkAttributeSet *attributes, AtkText return AddTextAttribute(attributes, attr, g_strdup(atk_text_attribute_get_value(attr, i))); } -static AtkAttributeSet *AddTextColorAttribute(AtkAttributeSet *attributes, AtkTextAttribute attr, const ColourDesired &colour) { +static AtkAttributeSet *AddTextColorAttribute(AtkAttributeSet *attributes, AtkTextAttribute attr, ColourAlpha colour) { return AddTextAttribute(attributes, attr, g_strdup_printf("%u,%u,%u", colour.GetRed() * 257, colour.GetGreen() * 257, colour.GetBlue() * 257)); } -- cgit v1.2.3