X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/92afa2b150803da84a4bc7dfa4e580dbbff15c9a..9f6af110ffc427b7cd660523f693105176fe63c4:/src/generic/msgdlgg.cpp diff --git a/src/generic/msgdlgg.cpp b/src/generic/msgdlgg.cpp index e693f4eade..19aefb7c06 100644 --- a/src/generic/msgdlgg.cpp +++ b/src/generic/msgdlgg.cpp @@ -90,12 +90,19 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, #endif // 4) buttons - topsizer->Add( CreateButtonSizer( wxOK|wxCANCEL ), 0, wxCENTRE | wxALL, 10 ); + topsizer->Add( CreateButtonSizer( style ), 0, wxCENTRE | wxALL, 10 ); + SetAutoLayout( TRUE ); + SetSizer( topsizer ); + topsizer->SetSizeHints( this ); topsizer->Fit( this ); - SetSizer( topsizer ); - SetAutoLayout( TRUE ); + wxSize size( GetSize() ); + if (size.x < size.y*3/2) + { + size.x = size.y*3/2; + SetSize( size ); + } Centre( wxBOTH | wxCENTER_FRAME);