From 36c34330b2b8e18911219319bb8fbf297ced7f01 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 21 Dec 2016 03:47:36 +0100 Subject: [PATCH] Vertically line up mixer strip (backport from Mixbus) --- gtk2_ardour/mixer_strip.cc | 18 ++++++++++++++---- gtk2_ardour/mixer_ui.cc | 13 ++++++------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 9adb670924..0a31ac72bb 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -133,6 +133,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session* sess, boost::shared_ptr rt , meter_point_button (_("pre")) , monitor_section_button (0) , midi_input_enable_button (0) + , _plugin_insert_cnt (0) , _comment_button (_("Comments")) , trim_control (ArdourKnob::default_elements, ArdourKnob::Flags (ArdourKnob::Detent | ArdourKnob::ArcToZero)) , _visibility (X_("mixer-element-visibility")) @@ -321,14 +322,23 @@ MixerStrip::init () global_vpacker.pack_start (name_button, Gtk::PACK_SHRINK); } +#ifndef MIXBUS //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 + 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; + } + spacer.set_size_request (-1, scrollbar_height); global_vpacker.pack_end (spacer, false, false); +#endif global_frame.add (global_vpacker); global_frame.set_shadow_type (Gtk::SHADOW_IN); diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index ee4b616adf..20772ecfab 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -137,6 +137,8 @@ Mixer_UI::Mixer_UI () _group_tabs = new MixerGroupTabs (this); VBox* b = manage (new VBox); + b->set_spacing (0); + b->set_border_width (0); b->pack_start (*_group_tabs, PACK_SHRINK); b->pack_start (strip_packer); b->show_all (); @@ -252,15 +254,13 @@ Mixer_UI::Mixer_UI () list_vpacker.pack_start (rhs_pane2, true, true); string vca_text = _("Control Masters"); - Gtk::HBox* vca_top_padding = manage (new Gtk::HBox); - vca_top_padding->set_size_request (-1, 2); - vca_vpacker.pack_start (*vca_top_padding, false, false); - vca_label.set_text (vca_text); - vca_label_bar.set_size_request (-1, 16); /* must match height in GroupTabs::set_size_request() */ + vca_label_bar.set_size_request (-1, 16 + 1); /* must match height in GroupTabs::set_size_request() + 1 border px*/ +#ifndef MIXBUS vca_label_bar.set_name (X_("VCALabelBar")); vca_label_bar.add (vca_label); +#endif vca_vpacker.pack_start (vca_label_bar, false, false); @@ -348,7 +348,6 @@ Mixer_UI::Mixer_UI () rhs_pane2.show(); strip_packer.show(); inner_pane.show(); - vca_top_padding->show (); vca_scroller.show(); vca_vpacker.show(); vca_hpacker.show(); @@ -621,7 +620,7 @@ Mixer_UI::add_stripables (StripableList& slist) (*s)->presentation_info().PropertyChanged.connect (*this, invalidator(*this), boost::bind (&Mixer_UI::stripable_property_changed, this, _1, boost::weak_ptr(*s)), gui_context()); (*s)->PropertyChanged.connect (*this, invalidator(*this), boost::bind (&Mixer_UI::stripable_property_changed, this, _1, boost::weak_ptr(*s)), gui_context()); - } + } } catch (const std::exception& e) { error << string_compose (_("Error adding GUI elements for new tracks/busses %1"), e.what()) << endmsg; -- 2.30.2