Allow passing flags into TableDialog::add for labels.
authorCarl Hetherington <cth@carlh.net>
Tue, 1 Mar 2022 23:09:58 +0000 (00:09 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 9 Mar 2022 16:04:02 +0000 (17:04 +0100)
src/wx/table_dialog.cc
src/wx/table_dialog.h

index 05d06432cbaa85175f355291ab6ec0ceaf8f3926..c4ad5fff6eed933257d768bbd39ccd5727c2c1be 100644 (file)
@@ -57,12 +57,11 @@ TableDialog::layout ()
 
 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;
index fdc2022c84f6a39033f54794ecd09927d1cf35f1..b05e4e3436e4ee82b220ba4182bf562d614867b0 100644 (file)
@@ -38,7 +38,7 @@ protected:
                return w;
        }
 
-       wxStaticText* add (wxString text, bool label);
+       wxStaticText* add (wxString text, bool label, int flags = wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT);
        void add_spacer ();
 
        void layout ();