[PATCH 0/1] MR2802: wordpad: Resize buttons of toolbar to make them align with height of the font list combox.
The current size set to these buttons is too small when in HiDPI. And toolbar doesn't resize buttons for HiDPI, so we will need to reset it with TB_SETBUTTONSIZE manually. On Windows with a 250% scale:  vs  -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2802
From: Jactry Zeng <jzeng(a)codeweavers.com> The current size set to these buttons is too small when in HiDPI. --- programs/wordpad/wordpad.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 4a3aa2375bf..2a0d380a101 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -1937,6 +1937,8 @@ static LRESULT OnCreate( HWND hWnd ) GetWindowRect(hFontListWnd, &rect); height = max(height, rect.bottom - rect.top); + SendMessageW(hToolBarWnd, TB_SETBUTTONSIZE, 0, MAKELPARAM(height, height)); + rbb.cbSize = REBARBANDINFOW_V6_SIZE; rbb.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_CHILD | RBBIM_STYLE | RBBIM_ID; rbb.fStyle = RBBS_CHILDEDGE | RBBS_BREAK | RBBS_NOGRIPPER; @@ -1977,6 +1979,7 @@ static LRESULT OnCreate( HWND hWnd ) IDC_FORMATBAR, 8, hInstance, IDB_FORMATBAR, NULL, 0, 16, 16, 16, 16, sizeof(TBBUTTON)); SendMessageW(hFormatBarWnd, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_DRAWDDARROWS); + SendMessageW(hFormatBarWnd, TB_SETBUTTONSIZE, 0, MAKELPARAM(height, height)); AddButton(hFormatBarWnd, 0, ID_FORMAT_BOLD); AddButton(hFormatBarWnd, 1, ID_FORMAT_ITALIC); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2802
participants (2)
-
Jactry Zeng -
Jactry Zeng (@jactry)