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;
|
reinterpret_cast<wxWindow*>(const_cast<wxRadioBox*>(this))).y / 2;
|
||||||
|
|
||||||
// and also wide enough for its label
|
// and also wide enough for its label
|
||||||
int widthLabel;
|
int widthBox = wxStaticBox::DoGetBestSize().x;
|
||||||
GetTextExtent(GetLabelText(), &widthLabel, NULL);
|
if ( widthBox > width )
|
||||||
if ( widthLabel > width )
|
width = widthBox;
|
||||||
width = widthLabel;
|
|
||||||
|
|
||||||
return wxSize(width, height);
|
return wxSize(width, height);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user