summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-12 19:50:44 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-12 19:50:44 +0100
commit84de18ce3e3561c58370d0b5b6e6153f139499f3 (patch)
tree54c1568fef15e5c37d7271bcc361c73826ad4375 /src
parent063e5c06999f1952c06ea4c44c0c2470db164005 (diff)
Improve layout of export subtitles dialog, especially with de_DE translation.
Diffstat (limited to 'src')
-rw-r--r--src/wx/export_subtitles_dialog.cc35
-rw-r--r--src/wx/export_subtitles_dialog.h5
2 files changed, 26 insertions, 14 deletions
diff --git a/src/wx/export_subtitles_dialog.cc b/src/wx/export_subtitles_dialog.cc
index 312d82882..128cd8948 100644
--- a/src/wx/export_subtitles_dialog.cc
+++ b/src/wx/export_subtitles_dialog.cc
@@ -35,21 +35,23 @@ using boost::bind;
ExportSubtitlesDialog::ExportSubtitlesDialog (wxWindow* parent, int reels, bool interop)
- : TableDialog (parent, _("Export subtitles"), 2, 1, true)
+ : wxDialog(parent, wxID_ANY, _("Export subtitles"))
, _interop (interop)
- , _include_font (0)
{
+ auto sizer = new wxGridBagSizer(DCPOMATIC_SIZER_GAP, DCPOMATIC_SIZER_GAP);
+
+ int r = 0;
_split_reels = new CheckBox (this, _("Write reels into separate files"));
- add (_split_reels, false);
- add_spacer ();
+ sizer->Add(_split_reels, wxGBPosition(r, 0), wxGBSpan(1, 2));
+ ++r;
if (reels > 1) {
_split_reels->Enable (false);
}
_include_font = new CheckBox (this, _("Define font in output and export font file"));
- add (_include_font, false);
- add_spacer ();
+ sizer->Add(_include_font, wxGBPosition(r, 0), wxGBSpan(1, 2));
+ ++r;
if (!_interop) {
_include_font->Enable (false);
@@ -57,20 +59,31 @@ ExportSubtitlesDialog::ExportSubtitlesDialog (wxWindow* parent, int reels, bool
wxString const wildcard = _interop ? _("Subtitle files (.xml)|*.xml") : _("Subtitle files (.mxf)|*.mxf");
- _file_label = add (_("Output file"), true);
+ _file_label = new wxStaticText(this, wxID_ANY, _("Output file"));
+ sizer->Add(_file_label, wxGBPosition(r, 0));
_file = new FilePickerCtrl(this, _("Select output file"), wildcard, false, true, "ExportSubtitlesPath");
- add (_file);
+ sizer->Add(_file, wxGBPosition(r, 1));
+ ++r;
- _dir_label = add (_("Output folder"), true);
+ _dir_label = new wxStaticText(this, wxID_ANY, (_("Output folder")));
+ sizer->Add(_dir_label, wxGBPosition(r, 0));
_dir = new DirPickerCtrl (this);
- add (_dir);
+ sizer->Add(_dir, wxGBPosition(r, 1));
_split_reels->bind(&ExportSubtitlesDialog::setup_sensitivity, this);
_include_font->bind(&ExportSubtitlesDialog::setup_sensitivity, this);
_file->Bind (wxEVT_FILEPICKER_CHANGED, bind(&ExportSubtitlesDialog::setup_sensitivity, this));
_dir->Bind (wxEVT_DIRPICKER_CHANGED, bind(&ExportSubtitlesDialog::setup_sensitivity, this));
- layout ();
+ auto overall_sizer = new wxBoxSizer(wxVERTICAL);
+ overall_sizer->Add(sizer, 1, wxALL, DCPOMATIC_DIALOG_BORDER);
+
+ auto buttons = CreateSeparatedButtonSizer(wxOK | wxCANCEL);
+ if (buttons) {
+ overall_sizer->Add(buttons, wxSizerFlags().Expand().DoubleBorder());
+ }
+
+ SetSizerAndFit(overall_sizer);
setup_sensitivity ();
}
diff --git a/src/wx/export_subtitles_dialog.h b/src/wx/export_subtitles_dialog.h
index 0a3177cac..52170418e 100644
--- a/src/wx/export_subtitles_dialog.h
+++ b/src/wx/export_subtitles_dialog.h
@@ -20,7 +20,6 @@
#include "dir_picker_ctrl.h"
-#include "table_dialog.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
@@ -32,7 +31,7 @@ class CheckBox;
class FilePickerCtrl;
-class ExportSubtitlesDialog : public TableDialog
+class ExportSubtitlesDialog : public wxDialog
{
public:
ExportSubtitlesDialog (wxWindow* parent, int reels, bool interop);
@@ -46,7 +45,7 @@ private:
bool _interop;
CheckBox* _split_reels;
- CheckBox* _include_font;
+ CheckBox* _include_font = nullptr;
wxStaticText* _file_label;
FilePickerCtrl* _file;
DirPickerCtrl* _dir;