forked from AuroraMiddleware/gtk
win32 theme: use TS_TRUE in GetThemePartSize
Several styles return a size of 0x0px when using TS_DRAW, as we don't pass a RECT to draw into. https://bugzilla.gnome.org/show_bug.cgi?id=773221
This commit is contained in:
parent
ed980824c4
commit
77ff3ada62
@ -459,7 +459,7 @@ gtk_win32_theme_get_part_size (GtkWin32Theme *theme,
|
|||||||
if (use_xp_theme && GetThemePartSize != NULL && htheme != NULL)
|
if (use_xp_theme && GetThemePartSize != NULL && htheme != NULL)
|
||||||
{
|
{
|
||||||
hdc = GetDC (NULL);
|
hdc = GetDC (NULL);
|
||||||
res = GetThemePartSize (htheme, hdc, part, state, NULL, 2 /*TS_DRAW*/, &size);
|
res = GetThemePartSize (htheme, hdc, part, state, NULL, 1 /* TS_TRUE */, &size);
|
||||||
ReleaseDC (NULL, hdc);
|
ReleaseDC (NULL, hdc);
|
||||||
|
|
||||||
if (SUCCEEDED (res))
|
if (SUCCEEDED (res))
|
||||||
@ -472,7 +472,6 @@ gtk_win32_theme_get_part_size (GtkWin32Theme *theme,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gtk_win32_get_theme_part_size (theme->class_name, part, state, width, height);
|
gtk_win32_get_theme_part_size (theme->class_name, part, state, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user