Layout alignment tweaks.
authorCarl Hetherington <cth@carlh.net>
Sat, 14 May 2022 21:44:45 +0000 (23:44 +0200)
committerCarl Hetherington <cth@carlh.net>
Sat, 14 May 2022 22:20:31 +0000 (00:20 +0200)
src/wx/full_config_dialog.cc
src/wx/wx_util.cc

index a9618ce388d4cfbf2f490bda9a6fbf32a6122682..8fc029f747c8388413e8a684101c22cb038d439b 100644 (file)
@@ -1482,24 +1482,25 @@ private:
                table->AddSpacer (0);
 
                _allow_any_dcp_frame_rate = new CheckBox (_panel, _("Allow any DCP frame rate"));
                table->AddSpacer (0);
 
                _allow_any_dcp_frame_rate = new CheckBox (_panel, _("Allow any DCP frame rate"));
-               table->Add (_allow_any_dcp_frame_rate, 1, wxEXPAND | wxALL);
+               table->Add (_allow_any_dcp_frame_rate, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
                table->AddSpacer (0);
 
                _allow_any_container = new CheckBox (_panel, _("Allow full-frame and non-standard container ratios"));
                table->AddSpacer (0);
 
                _allow_any_container = new CheckBox (_panel, _("Allow full-frame and non-standard container ratios"));
-               table->Add (_allow_any_container, 1, wxEXPAND | wxALL);
-               restart = add_label_to_sizer (table, _panel, _("(restart DCP-o-matic to see all ratios)"), false);
+               table->Add (_allow_any_container, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
+               restart = new StaticText (_panel, _("(restart DCP-o-matic to see all ratios)"));
+               table->Add (restart, 1, wxEXPAND | wxALL | wxALIGN_CENTRE_VERTICAL);
                restart->SetFont (font);
 
                _allow_96khz_audio = new CheckBox (_panel, _("Allow creation of DCPs with 96kHz audio"));
                restart->SetFont (font);
 
                _allow_96khz_audio = new CheckBox (_panel, _("Allow creation of DCPs with 96kHz audio"));
-               table->Add (_allow_96khz_audio, 1, wxEXPAND | wxALL);
+               table->Add (_allow_96khz_audio, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
                table->AddSpacer (0);
 
                _show_experimental_audio_processors = new CheckBox (_panel, _("Show experimental audio processors"));
                table->AddSpacer (0);
 
                _show_experimental_audio_processors = new CheckBox (_panel, _("Show experimental audio processors"));
-               table->Add (_show_experimental_audio_processors, 1, wxEXPAND | wxALL);
+               table->Add (_show_experimental_audio_processors, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
                table->AddSpacer (0);
 
                _only_servers_encode = new CheckBox (_panel, _("Only servers encode"));
                table->AddSpacer (0);
 
                _only_servers_encode = new CheckBox (_panel, _("Only servers encode"));
-               table->Add (_only_servers_encode, 1, wxEXPAND | wxALL);
+               table->Add (_only_servers_encode, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
                table->AddSpacer (0);
 
                {
                table->AddSpacer (0);
 
                {
@@ -1517,7 +1518,7 @@ private:
                        align->Add (format, 0, wxTOP, 2);
                        table->Add (align, 0, wxALIGN_RIGHT | wxRIGHT, DCPOMATIC_SIZER_GAP - 2);
 #else
                        align->Add (format, 0, wxTOP, 2);
                        table->Add (align, 0, wxALIGN_RIGHT | wxRIGHT, DCPOMATIC_SIZER_GAP - 2);
 #else
-                       table->Add (format, 0, wxTOP | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
+                       table->Add (format, 0, wxTOP | wxLEFT | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
 #endif
                        dcp::NameFormat::Map titles;
                        titles['t'] = wx_to_std (_("type (cpl/pkl)"));
 #endif
                        dcp::NameFormat::Map titles;
                        titles['t'] = wx_to_std (_("type (cpl/pkl)"));
@@ -1536,7 +1537,7 @@ private:
                        align->Add (format, 0, wxTOP, 2);
                        table->Add (align, 0, wxALIGN_RIGHT | wxRIGHT, DCPOMATIC_SIZER_GAP - 2);
 #else
                        align->Add (format, 0, wxTOP, 2);
                        table->Add (align, 0, wxALIGN_RIGHT | wxRIGHT, DCPOMATIC_SIZER_GAP - 2);
 #else
-                       table->Add (format, 0, wxTOP | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
+                       table->Add (format, 0, wxTOP | wxLEFT | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
 #endif
                        dcp::NameFormat::Map titles;
                        titles['t'] = wx_to_std (_("type (j2c/pcm/sub)"));
 #endif
                        dcp::NameFormat::Map titles;
                        titles['t'] = wx_to_std (_("type (j2c/pcm/sub)"));
index 9974f61c983900e997e673da953afbe2bc1f60fe..55de4b1c706286b9503bb868fca3cbb4439a378f 100644 (file)
@@ -101,7 +101,7 @@ add_label_to_sizer (wxSizer* s, wxWindow* p, wxString t, bool left, int prop, in
        setup_osx_flags (s, left, flags);
 #endif
        auto m = create_label (p, t, left);
        setup_osx_flags (s, left, flags);
 #endif
        auto m = create_label (p, t, left);
-       s->Add (m, prop, flags, 6);
+       s->Add (m, prop, flags, DCPOMATIC_SIZER_GAP);
        return m;
 }
 
        return m;
 }
 
@@ -116,7 +116,7 @@ add_label_to_sizer (wxSizer* s, wxStaticText* t, bool, int prop, int flags)
 #ifdef __WXOSX__
        setup_osx_flags (s, left, flags);
 #endif
 #ifdef __WXOSX__
        setup_osx_flags (s, left, flags);
 #endif
-       s->Add (t, prop, flags, 6);
+       s->Add (t, prop, flags, DCPOMATIC_SIZER_GAP);
        return t;
 }
 
        return t;
 }