#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>
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);
}
#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>
{
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;
+}
+
extern double dpi_scale_factor (wxWindow* window);
extern int search_ctrl_height ();
extern void report_config_load_failure(wxWindow* parent, Config::LoadFailure what);
+extern bool layout_for_short_screen(wxWindow* reference);
struct Offset