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

comctl32/status: Do not use theme metrics to compute height.

Fix status test failures when theming is on. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f51a12f9
......@@ -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;
}
......
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