From 161f7c27bd1aff63938a9512ab991de886691f97 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 2 Mar 2022 00:09:58 +0100 Subject: [PATCH 1/1] Allow passing flags into TableDialog::add for labels. --- src/wx/table_dialog.cc | 5 ++--- src/wx/table_dialog.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wx/table_dialog.cc b/src/wx/table_dialog.cc index 05d06432c..c4ad5fff6 100644 --- a/src/wx/table_dialog.cc +++ b/src/wx/table_dialog.cc @@ -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; diff --git a/src/wx/table_dialog.h b/src/wx/table_dialog.h index fdc2022c8..b05e4e343 100644 --- a/src/wx/table_dialog.h +++ b/src/wx/table_dialog.h @@ -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 (); -- 2.30.2