[v2 PATCH 3/3] user32/button: Fix groupbox rectangle calculation in the button's WM_SETTEXT handler

Nikolay Sivov nsivov at codeweavers.com
Mon Feb 6 02:43:50 CST 2017


From: Dmitry Timoshkov <dmitry at baikal.ru>

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/user32/button.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/user32/button.c b/dlls/user32/button.c
index 48fa597b70..442288f3d7 100644
--- a/dlls/user32/button.c
+++ b/dlls/user32/button.c
@@ -395,6 +395,9 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
 
             GetClientRect(hWnd, &client);
             rc = client;
+            /* FIXME: check other BS_* handlers */
+            if (btn_type == BS_GROUPBOX)
+                InflateRect(&rc, -7, 1); /* GB_Paint does this */
             if ((hFont = get_button_font(hWnd))) hPrevFont = SelectObject(hdc, hFont);
             BUTTON_CalcLabelRect(hWnd, hdc, &rc);
             if (hPrevFont) SelectObject(hdc, hPrevFont);
-- 
2.11.0




More information about the wine-patches mailing list