mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:03:00 +00:00
[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
This commit is contained in:
parent
27c1e20f13
commit
3df13bc41a
1 changed files with 1 additions and 5 deletions
|
@ -61,15 +61,11 @@ COLORREF WINAPI GetThemeSysColor(HTHEME hTheme, int iColorID)
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
PTHEME_PROPERTY tp;
|
PTHEME_PROPERTY tp;
|
||||||
|
|
||||||
// TODO: Check if this is correct
|
|
||||||
if ( iColorID >= 0 && iColorID < 32)
|
|
||||||
iColorID += TMT_SCROLLBAR;
|
|
||||||
|
|
||||||
TRACE("(%p, %d)\n", hTheme, iColorID);
|
TRACE("(%p, %d)\n", hTheme, iColorID);
|
||||||
SetLastError(0);
|
SetLastError(0);
|
||||||
if(hTheme) {
|
if(hTheme) {
|
||||||
PTHEME_CLASS ptc = (PTHEME_CLASS) 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;
|
COLORREF color;
|
||||||
hr = MSSTYLES_GetPropertyColor(tp, &color);
|
hr = MSSTYLES_GetPropertyColor(tp, &color);
|
||||||
if(SUCCEEDED(hr))
|
if(SUCCEEDED(hr))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue