Improve minimum width of wxRadioBox
Take the minimum width of the wxStaticBox into account, instead of only the width of the label.
This commit is contained in:
@@ -586,10 +586,9 @@ wxSize wxRadioBox::GetTotalButtonSize(const wxSize& sizeBtn) const
|
||||
reinterpret_cast<wxWindow*>(const_cast<wxRadioBox*>(this))).y / 2;
|
||||
|
||||
// and also wide enough for its label
|
||||
int widthLabel;
|
||||
GetTextExtent(GetLabelText(), &widthLabel, NULL);
|
||||
if ( widthLabel > width )
|
||||
width = widthLabel;
|
||||
int widthBox = wxStaticBox::DoGetBestSize().x;
|
||||
if ( widthBox > width )
|
||||
width = widthBox;
|
||||
|
||||
return wxSize(width, height);
|
||||
}
|
||||
|
Reference in New Issue
Block a user