summaryrefslogtreecommitdiff
path: root/src/wx/wx_util.cc
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/wx/wx_util.cc
parent0da18dbf9b62b532f48a4e859f70f4ddedb6f78e (diff)
Extract layout_for_short_screen().
Diffstat (limited to 'src/wx/wx_util.cc')
-rw-r--r--src/wx/wx_util.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index fc8b3dc99..e82ca8e1b 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -42,6 +42,7 @@
#include <dcp/locale_convert.h>
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
+#include <wx/display.h>
#include <wx/filepicker.h>
#include <wx/progdlg.h>
#include <wx/sizer.h>
@@ -828,3 +829,12 @@ wx::report_problem()
{
return std_to_wx(::report_problem());
}
+
+
+bool
+layout_for_short_screen(wxWindow* reference)
+{
+ auto const sn = wxDisplay::GetFromWindow(reference);
+ return sn >= 0 && wxDisplay(sn).GetClientArea().height <= 800;
+}
+