From 3df13bc41a0f32167a422eb3c1d985d9601ccf10 Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Sun, 19 Feb 2017 16:32:44 +0000 Subject: [PATCH] [UXTHEME] Fix the conversion from color id to theme metric and don't pass the metric id to GetSysColor. CORE-11086 svn path=/trunk/; revision=73847 --- reactos/dll/win32/uxtheme/metric.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/reactos/dll/win32/uxtheme/metric.c b/reactos/dll/win32/uxtheme/metric.c index f2bf9368fbe..9889f80a29a 100644 --- a/reactos/dll/win32/uxtheme/metric.c +++ b/reactos/dll/win32/uxtheme/metric.c @@ -61,15 +61,11 @@ COLORREF WINAPI GetThemeSysColor(HTHEME hTheme, int iColorID) HRESULT hr; PTHEME_PROPERTY tp; - // TODO: Check if this is correct - if ( iColorID >= 0 && iColorID < 32) - iColorID += TMT_SCROLLBAR; - TRACE("(%p, %d)\n", hTheme, iColorID); SetLastError(0); if(hTheme) { PTHEME_CLASS ptc = (PTHEME_CLASS) hTheme; - if((tp = MSSTYLES_FindMetric(ptc->tf, TMT_COLOR, iColorID))) { + if((tp = MSSTYLES_FindMetric(ptc->tf, TMT_COLOR, iColorID + TMT_FIRSTCOLOR))) { COLORREF color; hr = MSSTYLES_GetPropertyColor(tp, &color); if(SUCCEEDED(hr))