X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fupdate_dialog.cc;h=0b4753d1b6e769ced154f65db86b93534317eb38;hb=e7ee69e61c1bd968e85fc8d7b3641c0fc4282813;hp=a4da39e185b94e423a266e6ca77b9af7739e9dc1;hpb=9c1bb2e5ca7c80c4e26b1b2e41159aa171360a94;p=dcpomatic.git diff --git a/src/wx/update_dialog.cc b/src/wx/update_dialog.cc index a4da39e18..0b4753d1b 100644 --- a/src/wx/update_dialog.cc +++ b/src/wx/update_dialog.cc @@ -18,18 +18,24 @@ */ + #include "update_dialog.h" #include "static_text.h" #include "wx_util.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS + using std::string; using boost::optional; + UpdateDialog::UpdateDialog (wxWindow* parent, optional stable, optional test) : wxDialog (parent, wxID_ANY, _("Update")) { - wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL); + auto overall_sizer = new wxBoxSizer (wxVERTICAL); wxStaticText* message; @@ -39,27 +45,27 @@ UpdateDialog::UpdateDialog (wxWindow* parent, optional stable, optional< message = new StaticText (this, _("New versions of DCP-o-matic are available.")); } - overall_sizer->Add (message, 1, wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER); + overall_sizer->Add (message, 0, wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER); - wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); + auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); if (stable) { - add_label_to_sizer (table, this, _("Stable version ") + std_to_wx (stable.get ()), true); - wxHyperlinkCtrl* h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/download", "http://dcpomatic.com/download"); - table->Add (h); + add_label_to_sizer (table, this, _("Stable version ") + std_to_wx(stable.get()), true, 0, wxALIGN_CENTER_VERTICAL); + auto h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/download", "https://dcpomatic.com/download"); + table->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_DIALOG_BORDER); } if (test) { - add_label_to_sizer (table, this, _("Test version ") + std_to_wx (test.get ()), true); - wxHyperlinkCtrl* h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/test-download", "http://dcpomatic.com/test-download"); - table->Add (h); + add_label_to_sizer (table, this, _("Test version ") + std_to_wx(test.get()), true, 0, wxALIGN_CENTER_VERTICAL); + auto h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/test-download", "https://dcpomatic.com/test-download"); + table->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_DIALOG_BORDER); } - overall_sizer->Add (table, 1, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, DCPOMATIC_DIALOG_BORDER); + overall_sizer->Add (table, 0, wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER); - wxSizer* buttons = CreateButtonSizer (wxOK); + auto buttons = CreateButtonSizer (wxOK); if (buttons) { - overall_sizer->Add (buttons, 1, wxEXPAND | wxALL); + overall_sizer->Add (buttons, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER); } SetSizerAndFit (overall_sizer);