comctl32/button: Do not restore checkbox font after themed painting.

Fix button tests failures when theming is on.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2021-10-01 11:27:00 +08:00 committed by Alexandre Julliard
parent 8b30c00a7b
commit 687d9d0bee
1 changed files with 1 additions and 2 deletions

View File

@ -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)))