diff options
author | Robin Gareus <robin@gareus.org> | 2015-04-24 22:16:34 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-04-24 22:37:03 +0200 |
commit | de80782f05d7da5fc8c028e965e3a7bafa80b5a1 (patch) | |
tree | 0ddf3bc78c3a18d4d80ec10ea41d24fc8fe7a8b1 /gtk2_ardour/mixer_strip.cc | |
parent | 57e80c2c8fc4f08590ba1e35ec5e7bae3d85a169 (diff) |
add trim control to mixer-strip.
Diffstat (limited to 'gtk2_ardour/mixer_strip.cc')
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 7c59075f5a..302d74f499 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -34,6 +34,7 @@ #include <gtkmm2ext/slider_controller.h> #include <gtkmm2ext/bindable_button.h> +#include "ardour/amp.h" #include "ardour/audio_track.h" #include "ardour/audioengine.h" #include "ardour/internal_send.h" @@ -255,6 +256,14 @@ MixerStrip::init () _comment_button.set_name (X_("mixer strip button")); _comment_button.signal_clicked.connect (sigc::mem_fun (*this, &RouteUI::toggle_comment_editor)); +#define PX_SCALE(px) std::max((float)px, rintf((float)px * ARDOUR_UI::ui_scale)) + trim_control.set_size_request (PX_SCALE(20), PX_SCALE(20)); +#undef PX_SCALE + trim_control.set_tooltip_prefix ("Trim: "); + trim_control.set_name ("trim knob"); + trim_control.set_no_show_all (true); + input_button_box.pack_start (trim_control, false, false); + global_vpacker.set_border_width (1); global_vpacker.set_spacing (0); @@ -516,6 +525,15 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt) monitor_disk_button->hide (); } + if (route()->trim() && route()->trim()->active()) { + trim_control.show (); + trim_control.set_controllable (route()->trim()->gain_control()); + } else { + trim_control.hide (); + boost::shared_ptr<Controllable> none; + trim_control.set_controllable (none); + } + if (is_midi_track()) { if (midi_input_enable_button == 0) { midi_input_enable_button = manage (new ArdourButton); |