diff options
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 22 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.h | 2 |
2 files changed, 13 insertions, 11 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index ca1b104e0f..9adb670924 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -152,7 +152,6 @@ MixerStrip::init () ignore_toggle = false; comment_area = 0; _width_owner = 0; - spacer = 0; /* the length of this string determines the width of the mixer strip when it is set to `wide' */ longest_label = "longest label"; @@ -322,6 +321,15 @@ MixerStrip::init () global_vpacker.pack_start (name_button, Gtk::PACK_SHRINK); } + //add a spacer underneath the master bus; + //this fills the area that is taken up by the scrollbar on the tracks; + //and therefore keeps the faders "even" across the bottom + HScrollbar scrollbar; + Gtk::Requisition requisition(scrollbar.size_request ()); + int scrollbar_height = requisition.height; + spacer.set_size_request (-1, scrollbar_height+2); //+2 is a fudge factor to accomodate extra padding in mixer strip + global_vpacker.pack_end (spacer, false, false); + global_frame.add (global_vpacker); global_frame.set_shadow_type (Gtk::SHADOW_IN); global_frame.set_name ("BaseFrame"); @@ -557,15 +565,9 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt) } if (_mixer_owned && route()->is_master() ) { - - HScrollbar scrollbar; - Gtk::Requisition requisition(scrollbar.size_request ()); - int scrollbar_height = requisition.height; - - spacer = manage (new EventBox); - spacer->set_size_request (-1, scrollbar_height+2); - global_vpacker.pack_start (*spacer, false, false); - spacer->show(); + spacer.show(); + } else { + spacer.hide(); } if (is_track()) { diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h index c7a39393aa..7ee8db0b17 100644 --- a/gtk2_ardour/mixer_strip.h +++ b/gtk2_ardour/mixer_strip.h @@ -166,7 +166,7 @@ class MixerStrip : public AxisView, public RouteUI, public Gtk::EventBox ArdourButton width_button; ArdourButton number_label; Gtk::HBox width_hide_box; - Gtk::EventBox* spacer; + Gtk::EventBox spacer; void hide_clicked(); bool width_button_pressed (GdkEventButton *); |