X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5ecfa93af6c160057997c09db7220280e37518af..6003de2fe44e4e019580bfb42f526b8310fbb610:/src/generic/aboutdlgg.cpp diff --git a/src/generic/aboutdlgg.cpp b/src/generic/aboutdlgg.cpp index 8f72fe0e6d..21a6a05754 100644 --- a/src/generic/aboutdlgg.cpp +++ b/src/generic/aboutdlgg.cpp @@ -151,12 +151,25 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info) wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL); sizerTop->Add(sizerIconAndText, wxSizerFlags(1).Expand().Border()); - sizerTop->Add(new wxButton(this, wxID_OK), wxSizerFlags().Right().Border()); + + int defBorder = wxSizerFlags().Border().GetBorderInPixels(); + wxSizer *buttonSizer = CreateButtonSizer( wxOK , false, defBorder ); + if(buttonSizer->GetChildren().GetCount() > 0 ) + { + sizerTop->Add( buttonSizer, 0, wxEXPAND | wxALL, defBorder ); + } + else + { + sizerTop->AddSpacer( defBorder ); + delete buttonSizer; + } + SetSizerAndFit(sizerTop); CentreOnScreen(); - FindWindow(wxID_OK)->SetFocus(); + wxWindow *ok = FindWindow(wxID_OK); + if (ok) ok->SetFocus(); return true; }