summaryrefslogtreecommitdiff
path: root/src/wx/wx_util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-10-25 20:21:23 +0100
committerCarl Hetherington <cth@carlh.net>2020-10-26 11:21:29 +0100
commit8a743225a7e34bbadba63795076204204aac551a (patch)
tree5806059f3cf32c42511eec0f47a8a4f05ef683fa /src/wx/wx_util.cc
parented7986e9f0975ca26ac0ba72caaaedda482fe5e7 (diff)
Allow building and running with wxWidgets 3.1.x as well as 3.0.x.
Diffstat (limited to 'src/wx/wx_util.cc')
-rw-r--r--src/wx/wx_util.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 747d1df04..bb343b470 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -80,6 +80,22 @@ add_label_to_sizer (wxSizer* s, wxWindow* p, wxString t, bool left, int prop, in
return m;
}
+
+/* Hack: this is the same but has different default flags */
+wxStaticText *
+add_label_to_vertical_sizer (wxSizer* s, wxWindow* p, wxString t, bool left, int prop, int flags)
+{
+#ifdef __WXOSX__
+ if (left) {
+ flags |= wxALIGN_RIGHT;
+ }
+#endif
+ wxStaticText* m = create_label (p, t, left);
+ s->Add (m, prop, flags, 6);
+ return m;
+}
+
+
wxStaticText *
#ifdef __WXOSX__
add_label_to_sizer (wxSizer* s, wxStaticText* t, bool left, int prop, int flags)