Add indent option to wxGridBagSizer version of add_label_to_sizer
[dcpomatic.git] / src / wx / wx_util.cc
index e600b63c89c4506e4b161b3b1f5a64617df1a8e8..7a41f66e7cfa226c1bccb139f7fb88b3dc141082 100644 (file)
@@ -125,14 +125,14 @@ add_label_to_sizer (wxSizer* s, wxStaticText* t, bool, int prop, int flags)
 
 
 wxStaticText *
-add_label_to_sizer (wxGridBagSizer* s, wxWindow* p, wxString t, bool left, wxGBPosition pos, wxGBSpan span)
+add_label_to_sizer(wxGridBagSizer* s, wxWindow* p, wxString t, bool left, wxGBPosition pos, wxGBSpan span, bool indent)
 {
-       int flags = wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT;
+       int flags = wxALIGN_CENTER_VERTICAL | wxLEFT;
 #ifdef __WXOSX__
        setup_osx_flags (s, left, flags);
 #endif
        auto m = create_label (p, t, left);
-       s->Add (m, pos, span, flags);
+       s->Add(m, pos, span, flags, indent ? DCPOMATIC_SIZER_X_GAP : 0);
        return m;
 }