Piotr Caban : comctl32: Offset client area when toolbar divider is present.
Alexandre Julliard
julliard at winehq.org
Fri Jul 17 16:30:47 CDT 2020
Module: wine
Branch: master
Commit: 378548581d8799e7f9453f93ed4a7d6faa0377a7
URL: https://source.winehq.org/git/wine.git/?a=commit;h=378548581d8799e7f9453f93ed4a7d6faa0377a7
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri Jul 17 16:17:29 2020 +0200
comctl32: Offset client area when toolbar divider is present.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/tests/toolbar.c | 5 +++++
dlls/comctl32/toolbar.c | 6 +++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c
index f973d9cfff..b1ac1cd8bf 100644
--- a/dlls/comctl32/tests/toolbar.c
+++ b/dlls/comctl32/tests/toolbar.c
@@ -1649,6 +1649,11 @@ static void test_sizes(void)
ok(rect.top == 0, "rect.top = %d\n", rect.top);
ok(rect.bottom == 26, "rect.bottom = %d\n", rect.bottom);
+ rebuild_toolbar_ex(&hToolbar, WS_EX_DLGMODALFRAME);
+ GetClientRect(hToolbar, &rect);
+ ok(rect.top == 0, "rect.top = %d\n", rect.top);
+ ok(rect.bottom == 26, "rect.bottom = %d\n", rect.bottom);
+
free_tbsize_results();
DestroyWindow(hToolbar);
}
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index b2711a3eb8..c9ea56c078 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -3104,9 +3104,9 @@ TOOLBAR_AutoSize (TOOLBAR_INFO *infoPtr)
if (infoPtr->dwStyle & CCS_NOPARENTALIGN)
uPosFlags |= SWP_NOMOVE;
-
- if (!(infoPtr->dwStyle & CCS_NODIVIDER))
- cy += GetSystemMetrics(SM_CYEDGE);
+
+ if (!(infoPtr->dwStyle & CCS_NOMOVEY) && !(infoPtr->dwStyle & CCS_NODIVIDER))
+ y += GetSystemMetrics(SM_CYEDGE);
x += border.left;
y += border.top;
More information about the wine-cvs
mailing list