From edbea606f94a34872097620e2b79e9c07fa3c921 Mon Sep 17 00:00:00 2001 From: Vitaliy Margolen Date: Fri, 30 Jan 2009 09:06:03 -0700 Subject: [PATCH] comctl32: Fix propsheet size calculation. --- dlls/comctl32/propsheet.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 7c2f26a8ec5..785643db49a 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -740,7 +740,7 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo) HWND hwndTabCtrl = GetDlgItem(hwndDlg, IDC_TABCONTROL); HWND hwndButton = GetDlgItem(hwndDlg, IDOK); RECT rc,tabRect; - int tabOffsetX, tabOffsetY, buttonHeight; + int buttonHeight; PADDING_INFO padding = PROPSHEET_GetPaddingInfo(hwndDlg); RECT units; @@ -784,9 +784,6 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo) SendMessageW(hwndTabCtrl, TCM_ADJUSTRECT, TRUE, (LPARAM)&rc); - tabOffsetX = -(rc.left); - tabOffsetY = -(rc.top); - rc.right -= rc.left; rc.bottom -= rc.top; TRACE("setting tab %p, rc (0,0)-(%d,%d)\n", @@ -798,8 +795,14 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo) TRACE("tab client rc %s\n", wine_dbgstr_rect(&rc)); - rc.right += ((padding.x * 2) + tabOffsetX); - rc.bottom += (buttonHeight + (3 * padding.y) + tabOffsetY); + rc.right += (padding.x * 2); + rc.bottom += buttonHeight + (3 * padding.y); + + if (!psInfo->isModeless) + AdjustWindowRect(&rc, GetWindowLongW(hwndDlg, GWL_STYLE), FALSE); + + rc.right -= rc.left; + rc.bottom -= rc.top; /* * Resize the property sheet. -- 2.11.4.GIT