X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/897b24cf5ca5ca41734c79f7092104921e0c8cae..89b3361ec25cf1e6d255b14c7633d8375646e4fb:/demos/life/dialogs.cpp?ds=sidebyside diff --git a/demos/life/dialogs.cpp b/demos/life/dialogs.cpp index 36e98059a7..627f71ac6d 100644 --- a/demos/life/dialogs.cpp +++ b/demos/life/dialogs.cpp @@ -129,15 +129,10 @@ LifeSamplesDialog::LifeSamplesDialog(wxWindow *parent) #endif // wxUSE_STATLINE sizer3->Add( sizer2, 1, wxGROW | wxALL, 5 ); - wxSizer *buttonSizer = CreateButtonSizer( wxOK|wxCANCEL , true, 10 ); - if(buttonSizer->GetChildren().GetCount() > 0 ) + wxSizer *sizerBtns = CreateButtonSizer(wxOK|wxCANCEL); + if ( sizerBtns ) { - sizer3->Add( buttonSizer, 0, wxEXPAND | wxALL, 10 ); - } - else - { - sizer3->AddSpacer( 10 ); - delete buttonSizer; + sizer3->Add(sizerBtns, wxSizerFlags().Expand().Border()); } // activate @@ -202,15 +197,10 @@ XLife is (c) 1989 by Jon Bennett et al.")), 0, wxCENTRE | wxRIGHT|wxLEFT|wxTOP, 20 ); // buttons if any - wxSizer *buttonSizer = CreateButtonSizer( wxOK , true, 10 ); - if(buttonSizer->GetChildren().GetCount() > 0 ) - { - sizer->Add( buttonSizer, 0, wxEXPAND | wxALL, 10 ); - } - else + wxSizer *sizerBtns = CreateButtonSizer(wxOK); + if ( sizerBtns ) { - sizer->AddSpacer( 20 ); - delete buttonSizer; + sizer->Add(sizerBtns, wxSizerFlags().Expand().Border()); } // activate