+
+bool
+gui_is_dark ()
+{
+#if defined(DCPOMATIC_OSX) && wxCHECK_VERSION(3, 1, 0)
+ auto appearance = wxSystemSettings::GetAppearance();
+ return appearance.IsDark();
+#else
+ return false;
+#endif
+}
+
+
+#if wxCHECK_VERSION(3,1,0)
+double
+dpi_scale_factor (wxWindow* window)
+{
+ return window->GetDPIScaleFactor();
+}
+#else
+double
+dpi_scale_factor (wxWindow*)
+{
+ return 1;
+}
+#endif
+
+
+
+int
+search_ctrl_height ()
+{
+#ifdef __WXGTK3__
+ return 30;
+#else
+ return -1;
+#endif
+}
+
+
+void
+report_config_load_failure(wxWindow* parent, Config::LoadFailure what)
+{
+ switch (what) {
+ case Config::LoadFailure::CONFIG:
+ message_dialog(parent, _("The existing configuration failed to load. Default values will be used instead. These may take a short time to create."));
+ break;
+ case Config::LoadFailure::CINEMAS:
+ message_dialog(
+ parent,
+ _(wxString::Format("The cinemas list for creating KDMs (cinemas.xml) failed to load. Please check the numbered backup files in %s",
+ std_to_wx(Config::instance()->cinemas_file().parent_path().string())))
+ );
+ break;
+ case Config::LoadFailure::DKDM_RECIPIENTS:
+ message_dialog(
+ parent,
+ _(wxString::Format("The recipients list for creating DKDMs (dkdm_recipients.xml) failed to load. Please check the numbered backup files in %s",
+ std_to_wx(Config::instance()->dkdm_recipients_file().parent_path().string())))
+ );
+ break;
+ }
+}
+