Ensure wxRadioBox is big enough to fit its contents in wxMSW
Since the changes of ce1ee46b0c (Use wxRadioButton in MSW wxRadioBox
implementation, 2022-12-24) the control could be too small because we
only accounted for the extra static box margins in two directions (top
and left) but not the two other ones.
Fix this by adding the border around the buttons in all directions and
also increasing its size to preserve more or less the same appearance as
before.
Closes #23267.
This commit is contained in:
parent
238050bd51
commit
d4e9b9b95d
1 changed files with 5 additions and 2 deletions
|
|
@ -172,8 +172,11 @@ bool wxRadioBox::Create(wxWindow *parent,
|
|||
int borderTop, borderOther;
|
||||
GetBordersForSizer(&borderTop, &borderOther);
|
||||
|
||||
sizerBox->AddSpacer(borderTop);
|
||||
sizerBox->Add(sizerButtons, wxSizerFlags().Border(wxLEFT, borderOther));
|
||||
if ( borderTop > borderOther )
|
||||
sizerBox->AddSpacer(borderTop - borderOther);
|
||||
|
||||
borderOther += wxSizerFlags::GetDefaultBorder();
|
||||
sizerBox->Add(sizerButtons, wxSizerFlags().Border(wxALL, borderOther));
|
||||
|
||||
SetSizer(sizerBox);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue