Use control current, not best, size in wxMSW wxToolBar layout code
Avoid allocating too much space to the control in the toolbar, it may have been made smaller than its best size on purpose and, in any case, we don't resize the control, so it's useless to allocate more space to it than it's going to use. See #18294.
This commit is contained in:
@@ -443,7 +443,7 @@ void MyFrame::PopulateToolbar(wxToolBarBase* toolBar)
|
||||
wxComboBox *combo = new wxComboBox(toolBar, ID_COMBO, wxEmptyString, wxDefaultPosition, wxSize(100,-1) );
|
||||
combo->Append("This");
|
||||
combo->Append("is a");
|
||||
combo->Append("combobox");
|
||||
combo->Append("combobox with extremely, extremely, extremely, extremely long label");
|
||||
combo->Append("in a");
|
||||
combo->Append("toolbar");
|
||||
toolBar->AddControl(combo, "Combo Label");
|
||||
|
Reference in New Issue
Block a user