- void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
- {
- // TRUE is to force the frame to close
- Close(TRUE);
- }
-
- void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
- {
- wxHtmlWindow *html;
-#ifdef __WXMSW__
- wxDialog dlg(this, -1, "About", wxDefaultPosition, wxSize(400, 250), wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE);
-#else
- wxDialog dlg(this, -1, "About", wxDefaultPosition, wxSize(400, 230), wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE);
-#endif
+void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
+{
+ // true is to force the frame to close
+ Close(true);
+}
+
+void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
+{
+ wxBoxSizer *topsizer;
+ wxHtmlWindow *html;
+ wxDialog dlg(this, wxID_ANY, wxString(_("About")));
+
+ topsizer = new wxBoxSizer(wxVERTICAL);
+
+ html = new wxHtmlWindow(&dlg, wxID_ANY, wxDefaultPosition, wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
+ html -> SetBorders(0);
+ html -> LoadPage(wxT("data/about.htm"));
+ html -> SetSize(html -> GetInternalRepresentation() -> GetWidth(),
+ html -> GetInternalRepresentation() -> GetHeight());
+
+ topsizer -> Add(html, 1, wxALL, 10);
+
+#if wxUSE_STATLINE
+ topsizer -> Add(new wxStaticLine(&dlg, wxID_ANY), 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
+#endif // wxUSE_STATLINE
+
+ wxButton *bu1 = new wxButton(&dlg, wxID_OK, _("OK"));
+ bu1 -> SetDefault();
+
+ topsizer -> Add(bu1, 0, wxALL | wxALIGN_RIGHT, 15);
+
+ dlg.SetSizer(topsizer);
+ topsizer -> Fit(&dlg);