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: ![before](/uploads/940809f0147ccc11299e216e102cf19d/before.PNG)
vs
![after](/uploads/878699945699579f683d005b53ef7a1f/after.PNG)
From: Jactry Zeng jzeng@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);