Under wxMotif, default buttons are bigger than other buttons,
hence Realize() must be called after default button has been set. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -336,8 +336,6 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
|
|||||||
sizer->AddButton(help);
|
sizer->AddButton(help);
|
||||||
}
|
}
|
||||||
|
|
||||||
sizer->Realize();
|
|
||||||
|
|
||||||
if (flags & wxNO_DEFAULT)
|
if (flags & wxNO_DEFAULT)
|
||||||
{
|
{
|
||||||
if (no)
|
if (no)
|
||||||
@@ -359,12 +357,14 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
|
|||||||
yes->SetFocus();
|
yes->SetFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & wxOK)
|
if (flags & wxOK)
|
||||||
SetAffirmativeId(wxID_OK);
|
SetAffirmativeId(wxID_OK);
|
||||||
else if (flags & wxYES)
|
else if (flags & wxYES)
|
||||||
SetAffirmativeId(wxID_YES);
|
SetAffirmativeId(wxID_YES);
|
||||||
|
|
||||||
|
sizer->Realize();
|
||||||
|
|
||||||
return sizer;
|
return sizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user