Vitaliy Margolen : comctl32: Fix propsheet size calculation.
Alexandre Julliard
julliard at winehq.org
Mon Feb 2 09:01:22 CST 2009
Module: wine
Branch: master
Commit: edbea606f94a34872097620e2b79e9c07fa3c921
URL: http://source.winehq.org/git/wine.git/?a=commit;h=edbea606f94a34872097620e2b79e9c07fa3c921
Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date: Fri Jan 30 09:06:03 2009 -0700
comctl32: Fix propsheet size calculation.
---
dlls/comctl32/propsheet.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 7c2f26a..785643d 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.
More information about the wine-cvs
mailing list