diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-06-27 22:49:05 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-06-27 22:49:05 +0200 |
| commit | d3dbe752a3098328d5763f3fc0fd589bac0d5047 (patch) | |
| tree | 050b5a4c7b06bdaee48c4cf581271856330db4a4 /src/wx/content_advanced_dialog.cc | |
| parent | 0f13efdcc1a1994085b20940a2b9657a3f99bfcf (diff) | |
Switch the content advanced dialogue to use GridBagSizer.
Diffstat (limited to 'src/wx/content_advanced_dialog.cc')
| -rw-r--r-- | src/wx/content_advanced_dialog.cc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/wx/content_advanced_dialog.cc b/src/wx/content_advanced_dialog.cc index c97047c73..4b13a67d2 100644 --- a/src/wx/content_advanced_dialog.cc +++ b/src/wx/content_advanced_dialog.cc @@ -19,22 +19,34 @@ */ #include "content_advanced_dialog.h" +#include "wx_util.h" #include "lib/content.h" #include "lib/video_content.h" +#include <wx/gbsizer.h> #include <boost/bind.hpp> using boost::bind; using boost::shared_ptr; ContentAdvancedDialog::ContentAdvancedDialog (wxWindow* parent, shared_ptr<Content> content) - : TableDialog (parent, _("Advanced content settings"), 2, 0, false) + : wxDialog (parent, wxID_ANY, _("Advanced content settings")) , _content (content) { + wxGridBagSizer* sizer = new wxGridBagSizer (DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); + + int r = 0; wxCheckBox* ignore_video = new wxCheckBox (this, wxID_ANY, _("Ignore this content's video and use only audio, subtitles and closed captions")); - add (ignore_video); - add_spacer (); + sizer->Add (ignore_video, wxGBPosition(r, 0), wxGBSpan(1, 2)); + ++r; + + wxSizer* overall = new wxBoxSizer (wxVERTICAL); + overall->Add (sizer, 1, wxALL, DCPOMATIC_DIALOG_BORDER); + wxSizer* buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL); + if (buttons) { + overall->Add (buttons, wxSizerFlags().Expand().DoubleBorder()); + } - layout (); + SetSizerAndFit (overall); ignore_video->Enable (static_cast<bool>(_content->video)); ignore_video->SetValue (_content->video ? !content->video->use() : false); |
