From 2cef35247c4643623f952c07af14468a49be8c0b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 2 Jun 2022 21:12:25 +0200 Subject: [PATCH] Revert "Lua Dialogs: only add a scroller if we have 16+ items in the dialog" This reverts commit 817fccb3e5bcdefc64f2ca0e31a1bac8f653b37f. --- gtk2_ardour/luadialog.cc | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/gtk2_ardour/luadialog.cc b/gtk2_ardour/luadialog.cc index a4e74d5caa..9058f57b1b 100644 --- a/gtk2_ardour/luadialog.cc +++ b/gtk2_ardour/luadialog.cc @@ -600,9 +600,6 @@ Dialog::Dialog (std::string const& title, luabridge::LuaRef lr) if (!lr.isTable ()) { return; } - - int row_count = 0; - for (luabridge::Iterator i (lr); !i.isNil (); ++i) { if (!i.key ().isNumber ()) { continue; } if (!i.value ().isTable ()) { continue; } @@ -758,7 +755,6 @@ Dialog::Dialog (std::string const& title, luabridge::LuaRef lr) } _widgets.push_back(w); } - row_count++; } _ad.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); @@ -767,18 +763,14 @@ Dialog::Dialog (std::string const& title, luabridge::LuaRef lr) Gtk::Table* table = Gtk::manage (new Gtk::Table ()); table->set_col_spacings (20); table->set_row_spacings (8); - table->set_border_width (8); table->signal_size_allocate ().connect (sigc::mem_fun (this, &Dialog::table_size_alloc)); - if (row_count>16) { - _scroller.set_shadow_type(Gtk::SHADOW_NONE); - _scroller.set_border_width(0); - _scroller.add (*table); - _scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_NEVER); - _ad.get_vbox ()->pack_start (_scroller); - } else { - _ad.get_vbox ()->pack_start (*table); - } + _scroller.set_shadow_type(Gtk::SHADOW_NONE); + _scroller.set_border_width(0); + _scroller.add (*table); + _scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_NEVER); + + _ad.get_vbox ()->pack_start (_scroller); int row = 0; int last_end = -1;