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.
This commit is contained in:
Vadim Zeitlin
2016-06-26 18:51:50 +02:00
parent 98bb2b265a
commit 967bdbf994
2 changed files with 2 additions and 1 deletions

View File

@@ -1095,7 +1095,7 @@ bool wxToolBar::Realize()
// automatically according to the size of their bitmap and text
// label, if present. They look hideously ugly without autosizing
// when the labels have even slightly different lengths.
if ( !IsVertical() )
if ( HasFlag(wxTB_HORZ_LAYOUT) )
{
button.fsStyle |= TBSTYLE_AUTOSIZE;
}