Use equally-sized buttons in wxMSW horizontal toolbars
Only use TBSTYLE_AUTOSIZE, adjusting each button to the size it really needs,
for the toolbars with wxTB_HORZ_LAYOUT style as they don't have any uniform
button size anyhow.
(cherry picked from commit 967bdbf994)
This commit is contained in:
@@ -1091,11 +1091,12 @@ bool wxToolBar::Realize()
|
||||
|
||||
// Instead of using fixed widths for all buttons, size them
|
||||
// automatically according to the size of their bitmap and text
|
||||
// label, if present. This particularly matters for toolbars
|
||||
// with the wxTB_HORZ_LAYOUT style: they look hideously ugly
|
||||
// without autosizing when the labels have even slightly
|
||||
// different lengths.
|
||||
button.fsStyle |= TBSTYLE_AUTOSIZE;
|
||||
// label, if present. They look hideously ugly without autosizing
|
||||
// when the labels have even slightly different lengths.
|
||||
if ( HasFlag(wxTB_HORZ_LAYOUT) )
|
||||
{
|
||||
button.fsStyle |= TBSTYLE_AUTOSIZE;
|
||||
}
|
||||
|
||||
bitmapId++;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user