aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xgtk/ScintillaGTK.cxx9
-rw-r--r--qt/ScintillaEditBase/ScintillaEditBase.cpp2
-rw-r--r--src/ScintillaBase.h4
-rw-r--r--win32/ScintillaWin.cxx8
4 files changed, 13 insertions, 10 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 053202a06..4838bd58a 100755
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -704,10 +704,11 @@ void ScintillaGTK::Init() {
timers[tr].reason = static_cast<TickReason>(tr);
timers[tr].scintilla = this;
}
- vs.indicators[SC_INDICATOR_UNKNOWN] = Indicator(IndicatorStyle::Hidden, ColourRGBA(0, 0, 0xff));
- vs.indicators[SC_INDICATOR_INPUT] = Indicator(IndicatorStyle::Dots, ColourRGBA(0, 0, 0xff));
- vs.indicators[SC_INDICATOR_CONVERTED] = Indicator(IndicatorStyle::CompositionThick, ColourRGBA(0, 0, 0xff));
- vs.indicators[SC_INDICATOR_TARGET] = Indicator(IndicatorStyle::StraightBox, ColourRGBA(0, 0, 0xff));
+
+ vs.indicators[SC_INDICATOR_UNKNOWN] = Indicator(IndicatorStyle::Hidden, colourIME);
+ vs.indicators[SC_INDICATOR_INPUT] = Indicator(IndicatorStyle::Dots, colourIME);
+ vs.indicators[SC_INDICATOR_CONVERTED] = Indicator(IndicatorStyle::CompositionThick, colourIME);
+ vs.indicators[SC_INDICATOR_TARGET] = Indicator(IndicatorStyle::StraightBox, colourIME);
fontOptionsPrevious = FontOptions(PWidget(wText));
}
diff --git a/qt/ScintillaEditBase/ScintillaEditBase.cpp b/qt/ScintillaEditBase/ScintillaEditBase.cpp
index d18a5da29..f61125f9c 100644
--- a/qt/ScintillaEditBase/ScintillaEditBase.cpp
+++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp
@@ -56,8 +56,6 @@ ScintillaEditBase::ScintillaEditBase(QWidget *parent)
setAttribute(Qt::WA_KeyCompression);
setAttribute(Qt::WA_InputMethodEnabled);
- // All IME indicators drawn in same colour, blue, with different patterns
- const ColourRGBA colourIME(0, 0, UCHAR_MAX);
sqt->vs.indicators[IndicatorUnknown] = Indicator(IndicatorStyle::Hidden, colourIME);
sqt->vs.indicators[IndicatorInput] = Indicator(IndicatorStyle::Dots, colourIME);
sqt->vs.indicators[IndicatorConverted] = Indicator(IndicatorStyle::CompositionThick, colourIME);
diff --git a/src/ScintillaBase.h b/src/ScintillaBase.h
index b8331aaf0..bfeb5a3d9 100644
--- a/src/ScintillaBase.h
+++ b/src/ScintillaBase.h
@@ -10,6 +10,10 @@
namespace Scintilla::Internal {
+// For most platforms (not Cocoa) all IME indicators are drawn in same colour,
+// blue, with different patterns.
+constexpr ColourRGBA colourIME(0x0, 0x0, 0xffU);
+
class LexState;
/**
*/
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index b43503615..be910d0f9 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -615,10 +615,10 @@ ScintillaWin::ScintillaWin(HWND hwnd) {
HMODULE user32 = ::GetModuleHandleW(L"user32.dll");
SetCoalescableTimerFn = DLLFunction<SetCoalescableTimerSig>(user32, "SetCoalescableTimer");
- vs.indicators[IndicatorUnknown] = Indicator(IndicatorStyle::Hidden, ColourRGBA(0, 0, 0xff));
- vs.indicators[IndicatorInput] = Indicator(IndicatorStyle::Dots, ColourRGBA(0, 0, 0xff));
- vs.indicators[IndicatorConverted] = Indicator(IndicatorStyle::CompositionThick, ColourRGBA(0, 0, 0xff));
- vs.indicators[IndicatorTarget] = Indicator(IndicatorStyle::StraightBox, ColourRGBA(0, 0, 0xff));
+ vs.indicators[IndicatorUnknown] = Indicator(IndicatorStyle::Hidden, colourIME);
+ vs.indicators[IndicatorInput] = Indicator(IndicatorStyle::Dots, colourIME);
+ vs.indicators[IndicatorConverted] = Indicator(IndicatorStyle::CompositionThick, colourIME);
+ vs.indicators[IndicatorTarget] = Indicator(IndicatorStyle::StraightBox, colourIME);
}
ScintillaWin::~ScintillaWin() {