diff options
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index f14661164..b93616b77 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -695,12 +695,17 @@ void Menu::Show(Point pt, const Window &w) { Destroy(); } +ColourRGBA ColourFromSys(int nIndex) noexcept { + const DWORD colourValue = ::GetSysColor(nIndex); + return ColourRGBA::FromRGB(colourValue); +} + ColourRGBA Platform::Chrome() { - return ColourRGBA::FromRGB(static_cast<int>(::GetSysColor(COLOR_3DFACE))); + return ColourFromSys(COLOR_3DFACE); } ColourRGBA Platform::ChromeHighlight() { - return ColourRGBA::FromRGB(static_cast<int>(::GetSysColor(COLOR_3DHIGHLIGHT))); + return ColourFromSys(COLOR_3DHIGHLIGHT); } const char *Platform::DefaultFont() { |