diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-11-09 10:57:33 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-11-09 10:57:33 +0000 |
commit | 11a49970378c27e7462f785c544510daf3d66368 (patch) | |
tree | 90bf4da945c5c4fc3f8f50f6d2d6e4f42cfb4cef /gtk2_ardour | |
parent | 07ff18db2a0c8454f9d2535cad4efbf940d16aa9 (diff) |
make mute button span entire strip width if no solo button is shown (i.e. master). has th edownside that the mute and solo buttons are no longer part of the button size group, but things seem to be OK without that
git-svn-id: svn://localhost/ardour2/branches/3.0@10504 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 56c98c2024..02e483fea4 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -17,6 +17,7 @@ */ #include <cmath> +#include <list> #include <algorithm> #include <sigc++/bind.h> @@ -227,12 +228,6 @@ MixerStrip::init () button_table.set_homogeneous (false); button_table.set_spacings (0); - if (solo_button) { - button_size_group->add_widget (*solo_button); - } - if (mute_button) { - button_size_group->add_widget (*mute_button); - } if (solo_isolated_led) { button_size_group->add_widget (*solo_isolated_led); } @@ -255,8 +250,6 @@ MixerStrip::init () middle_button_table.set_homogeneous (true); middle_button_table.set_spacings (2); - middle_button_table.attach (*mute_button, 0, 1, 0, 1); - middle_button_table.attach (*solo_button, 1, 2, 0, 1); bottom_button_table.set_col_spacings (0); bottom_button_table.set_homogeneous (true); @@ -410,10 +403,23 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt) revert_to_default_display (); + if (solo_button->get_parent()) { + middle_button_table.remove (*solo_button); + } + + if (mute_button->get_parent()) { + middle_button_table.remove (*mute_button); + } + if (route()->is_master()) { + middle_button_table.attach (*mute_button, 0, 2, 0, 1); solo_button->hide (); + mute_button->show (); rec_solo_table.hide (); } else { + middle_button_table.attach (*mute_button, 0, 1, 0, 1); + middle_button_table.attach (*solo_button, 1, 2, 0, 1); + mute_button->show (); solo_button->show (); rec_solo_table.show (); } |