From 2b897e4c4a0cf9d67095b4d4d37d852f61d02667 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 28 Mar 2025 15:52:24 +1100 Subject: Standardize access to system colours through GetSysColor and avoid casts. --- win32/ListBox.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'win32/ListBox.cxx') diff --git a/win32/ListBox.cxx b/win32/ListBox.cxx index 88b44d9ed..68fe48d27 100644 --- a/win32/ListBox.cxx +++ b/win32/ListBox.cxx @@ -117,8 +117,7 @@ ColourRGBA ColourElement(std::optional colour, int nIndex) { if (colour.has_value()) { return colour.value(); } - const DWORD colourValue = ::GetSysColor(nIndex); - return ColourRGBA(colourValue); + return ColourFromSys(nIndex); } struct LBGraphics { -- cgit v1.2.3