X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftable_dialog.cc;h=c4ad5fff6eed933257d768bbd39ccd5727c2c1be;hb=ed0b5670e65647a9f0555ed66f81125678d193a7;hp=862f7db1a30f310091586398a8796f8fcb8819fa;hpb=9c1bb2e5ca7c80c4e26b1b2e41159aa171360a94;p=dcpomatic.git diff --git a/src/wx/table_dialog.cc b/src/wx/table_dialog.cc index 862f7db1a..c4ad5fff6 100644 --- a/src/wx/table_dialog.cc +++ b/src/wx/table_dialog.cc @@ -18,9 +18,11 @@ */ + +#include "static_text.h" #include "table_dialog.h" #include "wx_util.h" -#include "static_text.h" + TableDialog::TableDialog (wxWindow* parent, wxString title, int columns, int growable, bool cancel) : wxDialog (parent, wxID_ANY, title) @@ -38,12 +40,13 @@ TableDialog::TableDialog (wxWindow* parent, wxString title, int columns, int gro flags |= wxCANCEL; } - wxSizer* buttons = CreateSeparatedButtonSizer (flags); + auto buttons = CreateSeparatedButtonSizer (flags); if (buttons) { _overall_sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder()); } } + void TableDialog::layout () { @@ -51,26 +54,27 @@ TableDialog::layout () _overall_sizer->SetSizeHints (this); } + wxStaticText * #ifdef DCPOMATIC_OSX -TableDialog::add (wxString text, bool label) +TableDialog::add (wxString text, bool label, int flags) #else -TableDialog::add (wxString text, bool) +TableDialog::add (wxString text, bool, int flags) #endif { - int flags = wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT; #ifdef DCPOMATIC_OSX if (label) { flags |= wxALIGN_RIGHT; text += wxT (":"); } #endif - wxStaticText* m = new StaticText (this, wxT ("")); + auto m = new StaticText (this, wxT ("")); m->SetLabelMarkup (text); _table->Add (m, 0, flags, 6); return m; } + void TableDialog::add_spacer () {