Align mon-section bottom button
authorRobin Gareus <robin@gareus.org>
Wed, 21 Dec 2016 02:51:50 +0000 (03:51 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 21 Dec 2016 02:53:45 +0000 (03:53 +0100)
gtk2_ardour/monitor_section.cc

index 7fcfbd0810ff94a46b903af6e0afa1a1a9ed52f2..b1fbc246ead2321fb99132540e46a975a7b062e2 100644 (file)
@@ -412,6 +412,18 @@ MonitorSection::MonitorSection (Session* s)
        lower_packer->pack_start (*mono_dim_box,        false, false, PX_SCALE(2));
        lower_packer->pack_start (cut_all_button,       false, false, PX_SCALE(2));
 
+       // calc height of mixer scrollbar
+       int scrollbar_height = 0;
+       {
+               Gtk::Window window (WINDOW_TOPLEVEL);
+               HScrollbar scrollbar;
+               window.add (scrollbar);
+               scrollbar.set_name ("MixerWindow");
+               scrollbar.ensure_style();
+               Gtk::Requisition requisition(scrollbar.size_request ());
+               scrollbar_height = requisition.height;
+       }
+
        // output port select
        VBox* out_packer = manage (new VBox);
        out_packer->set_spacing (PX_SCALE(2));
@@ -429,7 +441,13 @@ MonitorSection::MonitorSection (Session* s)
        vpacker.pack_start (*level_tbl,           false, false, PX_SCALE(8));
        vpacker.pack_start (*lower_packer,        false, false, PX_SCALE(8));
        vpacker.pack_start (master_packer,        false, false, PX_SCALE(10));
-       vpacker.pack_end   (*out_packer,          false, false, PX_SCALE(3));
+       vpacker.pack_end   (*out_packer,          false, false,
+#ifdef MIXBUS
+                       scrollbar_height - 2 /* no outer frame */
+#else
+                       scrollbar_height + 2 /* frame borders */
+#endif
+                       );
 
        hpacker.set_spacing (0);
        hpacker.pack_start (vpacker, true, true);