summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-01-16 00:14:46 +0100
committerCarl Hetherington <cth@carlh.net>2025-01-16 00:14:46 +0100
commit921e681d6e4bde33c6652905dcebf4e7259cf14e (patch)
tree81ee631335e37e72b2b4596936f36c0225a3c457 /src/tools
parent0da18dbf9b62b532f48a4e859f70f4ddedb6f78e (diff)
Extract layout_for_short_screen().
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_kdm.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc
index 0c0af4a96..d554107cd 100644
--- a/src/tools/dcpomatic_kdm.cc
+++ b/src/tools/dcpomatic_kdm.cc
@@ -62,7 +62,6 @@
#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>
@@ -228,15 +227,9 @@ public:
h->SetFont (subheading_font);
right->Add(h, 0, wxTOP, DCPOMATIC_SUBHEADING_TOP_PAD);
- 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) {
+ if (layout_for_short_screen(this)) {
+ _output = new ShortKDMOutputPanel(overall_panel);
+ } else {
_output = new TallKDMOutputPanel(overall_panel);
}