LuaDialog: only hide border if scrollbar is n/a

This commit is contained in:
Robin Gareus 2022-06-03 01:52:02 +02:00
parent 972389e1bd
commit b6907cffba
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -771,14 +771,6 @@ Dialog::Dialog (std::string const& title, luabridge::LuaRef lr)
_scroller.add (*table);
_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_NEVER);
/* remove shadow from scrollWindow's viewport
* see http://www.mail-archive.com/gtkmm-list@gnome.org/msg03509.html
* and gtk2_ardour/meterbridge.cc
*/
Gtk::Viewport* viewport = (Gtk::Viewport*) _scroller.get_child();
viewport->set_shadow_type(Gtk::SHADOW_NONE);
viewport->set_border_width(0);
_ad.get_vbox ()->pack_start (_scroller);
int row = 0;
@ -851,6 +843,14 @@ Dialog::table_size_request (Gtk::Requisition* req)
if (req->height > max_height) {
_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
_ad.set_size_request (-1, max_height);
} else {
/* remove shadow from scrollWindow's viewport
* see http://www.mail-archive.com/gtkmm-list@gnome.org/msg03509.html
* and gtk2_ardour/meterbridge.cc
*/
Gtk::Viewport* viewport = (Gtk::Viewport*) _scroller.get_child();
viewport->set_shadow_type(Gtk::SHADOW_NONE);
viewport->set_border_width(0);
}
}