X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a5137d74ab4f665603d8c8c6518ad4464fc8917..64d78265d0256eb00ae59b717aa97e4c5786e003:/src/generic/msgdlgg.cpp diff --git a/src/generic/msgdlgg.cpp b/src/generic/msgdlgg.cpp index 06450f44a0..1fea61eafe 100644 --- a/src/generic/msgdlgg.cpp +++ b/src/generic/msgdlgg.cpp @@ -46,7 +46,6 @@ // icons // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARY BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) @@ -54,7 +53,6 @@ BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) END_EVENT_TABLE() IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog) -#endif wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, const wxString& message, @@ -92,10 +90,17 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, // 4) buttons 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);