#include "wx/generic/aboutdlgg.h"
#include "wx/hyperlink.h"
+#include "wx/collpane.h"
// ============================================================================
// implementation
bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info)
{
// TODO: should we use main frame as parent by default here?
- if ( !wxDialog::Create(NULL, wxID_ANY, _("About ") + info.GetName()) )
+ if ( !wxDialog::Create(NULL, wxID_ANY, _("About ") + info.GetName(),
+ wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE) )
return false;
m_sizerText = new wxBoxSizer(wxVERTICAL);
#endif // wxUSE_HYPERLINKCTRL/!wxUSE_HYPERLINKCTRL
}
- // TODO: add licence
+#if wxUSE_COLLPANE
+ // add licence
+ if ( info.HasLicence() )
+ {
+ wxCollapsiblePane *
+ licensepnl = new wxCollapsiblePane(this, wxID_ANY, wxT("License"));
+
+ new wxStaticText(licensepnl->GetPane(), wxID_ANY, info.GetLicence(),
+ wxDefaultPosition, wxDefaultSize,
+ wxALIGN_CENTRE);
+
+ m_sizerText->Add(licensepnl, wxSizerFlags(1).Expand().Border(wxBOTTOM));
+ }
+#endif // wxUSE_COLLPANE
// TODO: add credits (developers, artists, doc writers, translators)
wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
sizerTop->Add(sizerIconAndText, wxSizerFlags(1).Expand().Border());
- sizerTop->Add(new wxButton(this, wxID_OK), wxSizerFlags().Right().Border());
+
+ wxSizer *sizerBtns = CreateButtonSizer(wxOK);
+ if ( sizerBtns )
+ {
+ sizerTop->Add(sizerBtns, wxSizerFlags().Expand().Border());
+ }
+
SetSizerAndFit(sizerTop);
CentreOnScreen();
- FindWindow(wxID_OK)->SetFocus();
-
return true;
}