Author: gadamopoulos
Date: Sun Feb 19 16:32:44 2017
New Revision: 73847

URL: http://svn.reactos.org/svn/reactos?rev=73847&view=rev
Log:
[UXTHEME] Fix the conversion from color id to theme metric and don't pass the 
metric id to GetSysColor. CORE-11086

Modified:
    trunk/reactos/dll/win32/uxtheme/metric.c

Modified: trunk/reactos/dll/win32/uxtheme/metric.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/metric.c?rev=73847&r1=73846&r2=73847&view=diff
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/metric.c    [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/metric.c    [iso-8859-1] Sun Feb 19 
16:32:44 2017
@@ -61,15 +61,11 @@
     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))


Reply via email to