Make about dialog non-modal on GTK/Mac and don't show the OK button on Mac.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -185,11 +185,14 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info)
|
|||||||
wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
|
wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
|
||||||
sizerTop->Add(sizerIconAndText, wxSizerFlags(1).Expand().Border());
|
sizerTop->Add(sizerIconAndText, wxSizerFlags(1).Expand().Border());
|
||||||
|
|
||||||
|
// Mac typically doesn't use OK buttons just for dismissing dialogs.
|
||||||
|
#if !defined(__WXMAC__)
|
||||||
wxSizer *sizerBtns = CreateButtonSizer(wxOK);
|
wxSizer *sizerBtns = CreateButtonSizer(wxOK);
|
||||||
if ( sizerBtns )
|
if ( sizerBtns )
|
||||||
{
|
{
|
||||||
sizerTop->Add(sizerBtns, wxSizerFlags().Expand().Border());
|
sizerTop->Add(sizerBtns, wxSizerFlags().Expand().Border());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SetSizerAndFit(sizerTop);
|
SetSizerAndFit(sizerTop);
|
||||||
|
|
||||||
@@ -239,8 +242,13 @@ void wxGenericAboutDialog::AddCollapsiblePane(const wxString& title,
|
|||||||
|
|
||||||
void wxGenericAboutBox(const wxAboutDialogInfo& info)
|
void wxGenericAboutBox(const wxAboutDialogInfo& info)
|
||||||
{
|
{
|
||||||
|
#if !defined(__WXGTK__) && !defined(__WXMAC__)
|
||||||
wxGenericAboutDialog dlg(info);
|
wxGenericAboutDialog dlg(info);
|
||||||
dlg.ShowModal();
|
dlg.ShowModal();
|
||||||
|
#else
|
||||||
|
wxGenericAboutDialog* dlg = new wxGenericAboutDialog(info);
|
||||||
|
dlg->Show();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// currently wxAboutBox is implemented natively only under these platforms, for
|
// currently wxAboutBox is implemented natively only under these platforms, for
|
||||||
|
Reference in New Issue
Block a user