Zhiyi Zhang : comctl32/status: Do not use theme metrics to compute height.
Module: wine Branch: master Commit: 8f6a4438b4d2b9d12c5eeccec9a136a80de0a8ad URL: https://source.winehq.org/git/wine.git/?a=commit;h=8f6a4438b4d2b9d12c5eeccec... Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Oct 6 15:48:24 2021 +0800 comctl32/status: Do not use theme metrics to compute height. Fix status test 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/status.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 7bc9ec4386f..9078e4a70bc 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -102,7 +102,6 @@ static inline LPCSTR debugstr_t(LPCWSTR text, BOOL isW) static UINT STATUSBAR_ComputeHeight(STATUS_INFO *infoPtr) { - HTHEME theme; UINT height; TEXTMETRICW tm; int margin; @@ -111,21 +110,6 @@ STATUSBAR_ComputeHeight(STATUS_INFO *infoPtr) margin = (tm.tmInternalLeading ? tm.tmInternalLeading : 2); height = max(tm.tmHeight + margin + 2*GetSystemMetrics(SM_CYBORDER), infoPtr->minHeight) + infoPtr->verticalBorder; - if ((theme = GetWindowTheme(infoPtr->Self))) - { - /* Determine bar height from theme such that the content area is - * textHeight pixels large */ - HDC hdc = GetDC(infoPtr->Self); - RECT r; - - SetRect(&r, 0, 0, 0, max(infoPtr->minHeight, tm.tmHeight)); - if (SUCCEEDED(GetThemeBackgroundExtent(theme, hdc, SP_PANE, 0, &r, &r))) - { - height = r.bottom - r.top; - } - ReleaseDC(infoPtr->Self, hdc); - } - TRACE(" textHeight=%d+%d, final height=%d\n", tm.tmHeight, tm.tmInternalLeading, height); return height; }
participants (1)
-
Alexandre Julliard