Add search_ctrl_height()
[dcpomatic.git] / src / wx / screens_panel.cc
index 0038a30fbf01945d306ec8c89c1b214463adcda6..c5aea4223e5c62f4c381d16f1f7a1df28785c468 100644 (file)
@@ -47,13 +47,7 @@ ScreensPanel::ScreensPanel (wxWindow* parent)
 {
        auto sizer = new wxBoxSizer (wxVERTICAL);
 
-#ifdef __WXGTK3__
-       int const height = 30;
-#else
-       int const height = -1;
-#endif
-
-       _search = new wxSearchCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(200, height));
+       _search = new wxSearchCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(200, search_ctrl_height()));
 #ifndef __WXGTK3__
        /* The cancel button seems to be strangely broken in GTK3; clicking on it twice sometimes works */
        _search->ShowCancelButton (true);