From b20c3b551a4a87888cf00e5f7da22d836015a073 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 10 Oct 2023 09:11:27 +1100 Subject: Use global constants for opaque black and white and local constants for greys. Makes it easier to understand and reduces warnings. --- src/CallTip.cxx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/CallTip.cxx') diff --git a/src/CallTip.cxx b/src/CallTip.cxx index 87a2bab06..9a9428fee 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -37,6 +37,13 @@ size_t Chunk::Length() const noexcept { return end - start; } +namespace { + +constexpr ColourRGBA silver(0xc0, 0xc0, 0xc0); +constexpr ColourRGBA grey(0x80, 0x80, 0x80); + +} + CallTip::CallTip() noexcept { wCallTip = {}; inCallTipMode = false; @@ -57,14 +64,14 @@ CallTip::CallTip() noexcept { #ifdef __APPLE__ // proper apple colours for the default colourBG = ColourRGBA(0xff, 0xff, 0xc6); - colourUnSel = ColourRGBA(0, 0, 0); + colourUnSel = black; #else - colourBG = ColourRGBA(0xff, 0xff, 0xff); - colourUnSel = ColourRGBA(0x80, 0x80, 0x80); + colourBG = white; + colourUnSel = grey; #endif colourSel = ColourRGBA(0, 0, 0x80); - colourShade = ColourRGBA(0, 0, 0); - colourLight = ColourRGBA(0xc0, 0xc0, 0xc0); + colourShade = black; + colourLight = silver; codePage = 0; clickPlace = 0; } -- cgit v1.2.3