[PATCH 4/5] comctl32/status: Do not use theme metrics to compute height.
Zhiyi Zhang
zzhang at codeweavers.com
Wed Oct 6 02:48:24 CDT 2021
Fix status test failures when theming is on.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
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;
}
--
2.30.2
More information about the wine-devel
mailing list