summaryrefslogtreecommitdiff
path: root/gtk2_ardour/vca_master_strip.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-03-03 11:47:01 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:39 -0400
commit419c7e95f3fad3c6eaf6906ba05e9bc7e3944e08 (patch)
treecf4376783c55c01e5a723e45ecf984bba1152728 /gtk2_ardour/vca_master_strip.cc
parentc5c6be4170f1c8f27141d6174a6fb05a8f2d7852 (diff)
GUI modifications to improve VCA strips and their placement in the mixer
Note that this includes some changes that actually make mixer pane settings get restored, which has been broken for some time. Of course, they are not restored perfectly, yet.
Diffstat (limited to 'gtk2_ardour/vca_master_strip.cc')
-rw-r--r--gtk2_ardour/vca_master_strip.cc68
1 files changed, 65 insertions, 3 deletions
diff --git a/gtk2_ardour/vca_master_strip.cc b/gtk2_ardour/vca_master_strip.cc
index 038d995fb3..bccc1ab68e 100644
--- a/gtk2_ardour/vca_master_strip.cc
+++ b/gtk2_ardour/vca_master_strip.cc
@@ -16,11 +16,18 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "pbd/convert.h"
+
#include "ardour/vca.h"
+#include "tooltips.h"
#include "vca_master_strip.h"
+#include "i18n.h"
+
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
+using namespace Gtkmm2ext;
using std::string;
VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
@@ -33,13 +40,57 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
boost::shared_ptr<Amp>(),
_vca->control());
+ hide_button.set_icon (ArdourIcon::CloseCross);
+ set_tooltip (&hide_button, _("Hide this VCA strip"));
+
+ width_button.set_icon (ArdourIcon::StripWidth);
+ set_tooltip (width_button, _("Click to toggle the width of this VCA strip."));
+
+ width_button.signal_button_press_event().connect (sigc::mem_fun(*this, &VCAMasterStrip::width_button_pressed), false);
+ hide_button.signal_clicked.connect (sigc::mem_fun(*this, &VCAMasterStrip::hide_clicked));
+
+ width_hide_box.set_spacing (2);
+ width_hide_box.pack_start (width_button, false, true);
+ width_hide_box.pack_start (number_label, true, true);
+ width_hide_box.pack_end (hide_button, false, true);
+
+ number_label.set_text (PBD::to_string (v->number(), std::dec));
+ number_label.set_elements((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::Text|ArdourButton::Inactive));
+ number_label.set_no_show_all ();
+ number_label.set_name ("tracknumber label");
+ number_label.set_fixed_colors (0x80808080, 0x80808080);
+ number_label.set_alignment (.5, .5);
+ number_label.set_fallthrough_to_parent (true);
+
name_button.set_text (_vca->name());
active_button.set_text ("active");
- pack_start (active_button, false, false);
- pack_start (name_button, false, false);
- pack_start (gain_meter, true, true);
+ top_padding.set_size_request (-1, 16); /* must match height in GroupTabs::set_size_request() */
+ bottom_padding.set_size_request (-1, 50); /* this one is a hack. there's no trivial way to compute it */
+
+ global_vpacker.set_border_width (1);
+ global_vpacker.set_spacing (0);
+
+ global_vpacker.pack_start (top_padding, false, false);
+ global_vpacker.pack_start (width_hide_box, false, false);
+ global_vpacker.pack_start (active_button, false, false);
+ global_vpacker.pack_start (name_button, false, false);
+ global_vpacker.pack_start (vertical_padding, true, true);
+ global_vpacker.pack_start (gain_meter, false, false);
+ global_vpacker.pack_start (bottom_padding, false, false);
+ global_frame.add (global_vpacker);
+ global_frame.set_shadow_type (Gtk::SHADOW_IN);
+ global_frame.set_name ("BaseFrame");
+
+ add (global_frame);
+
+ global_vpacker.show ();
+ global_frame.show ();
+ top_padding.show ();
+ bottom_padding.show ();
+ vertical_padding.show ();
+ width_hide_box.show_all ();
active_button.show_all ();
name_button.show_all ();
gain_meter.show_all ();
@@ -50,3 +101,14 @@ VCAMasterStrip::name() const
{
return _vca->name();
}
+
+void
+VCAMasterStrip::hide_clicked ()
+{
+}
+
+bool
+VCAMasterStrip::width_button_pressed (GdkEventButton* ev)
+{
+ return false;
+}