macOS alignment fix (#2039).
[dcpomatic.git] / src / wx / text_panel.cc
index cdd61e109ab1b0a9dd5663fc50f290adc6709e01..134d397e83e3bc0f17e76c2b0ce7331645bb4e47 100644 (file)
@@ -82,30 +82,24 @@ TextPanel::TextPanel (ContentPanel* p, TextType t)
 
        _burn = new CheckBox (this, _("Burn subtitles into image"));
 
-#ifdef __WXGTK3__
-       int const spin_width = 118;
-#else
-       int const spin_width = 56;
-#endif
-
        _offset_label = create_label (this, _("Offset"), true);
        _x_offset_label = create_label (this, _("X"), true);
-       _x_offset = new SpinCtrl (this, spin_width);
+       _x_offset = new SpinCtrl (this, DCPOMATIC_SPIN_CTRL_WIDTH);
        _x_offset_pc_label = new StaticText (this, _("%"));
        _y_offset_label = create_label (this, _("Y"), true);
-       _y_offset = new SpinCtrl (this, spin_width);
+       _y_offset = new SpinCtrl (this, DCPOMATIC_SPIN_CTRL_WIDTH);
        _y_offset_pc_label = new StaticText (this, _("%"));
 
        _scale_label = create_label (this, _("Scale"), true);
        _x_scale_label = create_label (this, _("X"), true);
-       _x_scale = new SpinCtrl (this, spin_width);
+       _x_scale = new SpinCtrl (this, DCPOMATIC_SPIN_CTRL_WIDTH);
        _x_scale_pc_label = new StaticText (this, _("%"));
        _y_scale_label = create_label (this, S_("Coord|Y"), true);
-       _y_scale = new SpinCtrl (this, spin_width);
+       _y_scale = new SpinCtrl (this, DCPOMATIC_SPIN_CTRL_WIDTH);
        _y_scale_pc_label = new StaticText (this, _("%"));
 
        _line_spacing_label = create_label (this, _("Line spacing"), true);
-       _line_spacing = new SpinCtrl (this, spin_width);
+       _line_spacing = new SpinCtrl (this, DCPOMATIC_SPIN_CTRL_WIDTH);
        _line_spacing_pc_label = new StaticText (this, _("%"));
 
        _stream_label = create_label (this, _("Stream"), true);
@@ -171,7 +165,7 @@ TextPanel::setup_visibility ()
                        _language_type->Append (_("Main"));
                        _language_type->Append (_("Additional"));
                        _language_type->Bind (wxEVT_CHOICE, boost::bind(&TextPanel::language_is_additional_changed, this));
-                       _language_sizer->Add (_language_type, 0);
+                       _language_sizer->Add (_language_type, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_CHOICE_TOP_PAD);
                        _grid->Add (_language_sizer, wxGBPosition(_ccap_track_or_language_row, 1), wxGBSpan(1, 2));
                        film_content_changed (TextContentProperty::LANGUAGE);
                        film_content_changed (TextContentProperty::LANGUAGE_IS_ADDITIONAL);
@@ -343,7 +337,7 @@ TextPanel::update_dcp_tracks ()
                /* XXX: don't display the "magic" track which has empty name and language;
                   this is a nasty hack (see also Film::closed_caption_tracks)
                */
-               if (!i.name.empty() || !i.language.empty()) {
+               if (!i.name.empty() || i.language) {
                        _dcp_track->Append (std_to_wx(i.summary()));
                }
        }