diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-12-29 00:56:25 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-01-01 01:54:38 +0100 |
| commit | 52e7269c9d8dd9e7fcf68ba126eb4ce0a593cf76 (patch) | |
| tree | 8482144a6a0d8d6ae2960be2f9a37cd637acc1cb /src/tools | |
| parent | 75328ad3c7adf61f9103ced9efcc441159f4ac84 (diff) | |
Add shorter output panel for KDMs on smaller screens (#2646).
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_kdm.cc | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 1d22e0818..95165fcde 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -33,6 +33,7 @@ #include "wx/new_dkdm_folder_dialog.h" #include "wx/report_problem_dialog.h" #include "wx/screens_panel.h" +#include "wx/short_kdm_output_panel.h" #include "wx/static_text.h" #include "wx/tall_kdm_output_panel.h" #include "wx/wx_signal_manager.h" @@ -61,6 +62,7 @@ #include <dcp/filesystem.h> #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS +#include <wx/display.h> #include <wx/dnd.h> #include <wx/filepicker.h> #include <wx/preferences.h> @@ -225,8 +227,20 @@ public: h = new StaticText (overall_panel, _("Output")); h->SetFont (subheading_font); right->Add(h, 0, wxTOP, DCPOMATIC_SUBHEADING_TOP_PAD); - _output = new TallKDMOutputPanel(overall_panel); - right->Add (_output, 0, wxALL, DCPOMATIC_SIZER_Y_GAP); + + int const sn = wxDisplay::GetFromWindow(this); + if (sn >= 0) { + auto const screen = wxDisplay(sn).GetClientArea(); + if (screen.height <= 800) { + _output = new ShortKDMOutputPanel(overall_panel); + } + } + + if (!_output) { + _output = new TallKDMOutputPanel(overall_panel); + } + + right->Add (_output, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP); _create = new Button (overall_panel, _("Create KDMs")); right->Add(_create, 0, wxTOP, DCPOMATIC_SIZER_GAP); @@ -831,7 +845,7 @@ private: wxButton* _remove_dkdm; wxButton* _export_dkdm; wxButton* _create; - KDMOutputPanel* _output; + KDMOutputPanel* _output = nullptr; JobViewDialog* _job_view; Collator _collator; }; |
