Zhiyi Zhang : comctl32/button: Do not restore checkbox font after themed painting.
Module: wine Branch: master Commit: 687d9d0beefeb6b1b5c78b5a4554ab0315a8f64d URL: https://source.winehq.org/git/wine.git/?a=commit;h=687d9d0beefeb6b1b5c78b5a4... Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Fri Oct 1 11:27:00 2021 +0800 comctl32/button: Do not restore checkbox font after themed painting. Fix button tests failures when theming is on. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 7dfc1720508..894cc6a3df9 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -2744,8 +2744,7 @@ static void CB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in created_font = TRUE; } } else { - font = (HFONT)SendMessageW(infoPtr->hwnd, WM_GETFONT, 0, 0); - hPrevFont = SelectObject(hDC, font); + if (infoPtr->font) SelectObject(hDC, infoPtr->font); } if (FAILED(GetThemePartSize(theme, hDC, part, state, NULL, TS_DRAW, &sz)))
participants (1)
-
Alexandre Julliard