13
0

Don't try to limit the UI width if no screen is found

This commit is contained in:
Julien "_FrnchFrgg_" RIVAUD 2017-09-20 17:59:13 +02:00
parent 5a9adba1fb
commit a42f6ff828

View File

@ -224,6 +224,8 @@ GenericPluginUI::~GenericPluginUI ()
void void
GenericPluginUI::scroller_size_request (Gtk::Requisition* a) GenericPluginUI::scroller_size_request (Gtk::Requisition* a)
{ {
GtkRequisition request = hpacker.size_request();
Glib::RefPtr<Gdk::Window> window (get_window()); Glib::RefPtr<Gdk::Window> window (get_window());
Glib::RefPtr<Gdk::Screen> screen; Glib::RefPtr<Gdk::Screen> screen;
@ -232,6 +234,7 @@ GenericPluginUI::scroller_size_request (Gtk::Requisition* a)
} }
if (!screen) { if (!screen) {
a->width = request.width;
return; return;
} }
@ -243,8 +246,6 @@ GenericPluginUI::scroller_size_request (Gtk::Requisition* a)
const int maximum_width = monitor.get_width() * 0.9; const int maximum_width = monitor.get_width() * 0.9;
GtkRequisition request = hpacker.size_request();
if (request.width > maximum_width) { if (request.width > maximum_width) {
for (vector<ControlUI*>::const_iterator cuip = input_controls.begin(); for (vector<ControlUI*>::const_iterator cuip = input_controls.begin();
cuip != input_controls.end(); cuip != input_controls.end();