aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2023-10-12 09:46:14 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2023-10-12 09:46:14 +1100
commit810883d3e039c92ce33372cc2e762615325b37f9 (patch)
tree3fb34c7204cde897abd121a5fd71fd6b210c62a5 /src
parentfef04a18f5806f0842a1b97d3548738522ee1e33 (diff)
downloadscintilla-mirror-810883d3e039c92ce33372cc2e762615325b37f9.tar.gz
Move platform colour definitions outside constructor and improve names.
Diffstat (limited to 'src')
-rw-r--r--src/CallTip.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/CallTip.cxx b/src/CallTip.cxx
index 9a9428fee..188c9068e 100644
--- a/src/CallTip.cxx
+++ b/src/CallTip.cxx
@@ -39,8 +39,17 @@ size_t Chunk::Length() const noexcept {
namespace {
+#ifdef __APPLE__
+// Archaic macOS colours for the default: black on light yellow
+constexpr ColourRGBA colourTextAndArrow(black);
+constexpr ColourRGBA colourBackground(0xff, 0xff, 0xc6);
+#else
+// Grey on white
+constexpr ColourRGBA colourTextAndArrow(0x80, 0x80, 0x80);
+constexpr ColourRGBA colourBackground(white);
+#endif
+
constexpr ColourRGBA silver(0xc0, 0xc0, 0xc0);
-constexpr ColourRGBA grey(0x80, 0x80, 0x80);
}
@@ -61,14 +70,9 @@ CallTip::CallTip() noexcept {
borderHeight = 2; // Extra line for border and an empty line at top and bottom.
verticalOffset = 1;
-#ifdef __APPLE__
- // proper apple colours for the default
- colourBG = ColourRGBA(0xff, 0xff, 0xc6);
- colourUnSel = black;
-#else
- colourBG = white;
- colourUnSel = grey;
-#endif
+ colourBG = colourBackground;
+ colourUnSel = colourTextAndArrow;
+
colourSel = ColourRGBA(0, 0, 0x80);
colourShade = black;
colourLight = silver;