Commit 8aed2ec3 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

uxtheme: Use OpenThemeDataForDpi() to create a theme handle not associated to a window.

If a window is not passed to OpenThemeData(), OpenThemeData() assumes the DPI is 96 according to tests. And GetThemePartSize() should select theme parts according to the DPI stored in theme handles rather than using GDI device contexts. Thus, OpenThemeDataForDpi() should be used in place of OpenThemeData() when DPI is not 96 and theme handles shouldn't be associated with a window. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 7be103bb
......@@ -41,7 +41,11 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
HTHEME theme;
DWORD style;
theme = bar == SB_CTL ? GetWindowTheme(hwnd) : OpenThemeData(NULL, WC_SCROLLBARW);
if (bar == SB_CTL)
theme = GetWindowTheme(hwnd);
else
theme = OpenThemeDataForDpi(NULL, WC_SCROLLBARW, GetDpiForWindow(hwnd));
if (!theme)
{
user_api.pScrollBarDraw(hwnd, dc, bar, hit_test, tracking_info, draw_arrows, draw_interior,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment