diff options
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/gain_meter.cc | 10 | ||||
-rw-r--r-- | gtk2_ardour/gain_meter.h | 3 | ||||
-rw-r--r-- | gtk2_ardour/icons/fader_belt_desensitised.png | bin | 0 -> 2949 bytes | |||
-rw-r--r-- | gtk2_ardour/icons/fader_belt_h_desensitised.png | bin | 0 -> 2372 bytes | |||
-rw-r--r-- | gtk2_ardour/icons/fader_belt_h_thin_desensitised.png | bin | 0 -> 929 bytes | |||
-rw-r--r-- | gtk2_ardour/option_editor.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/option_editor.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.cc | 15 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.h | 3 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.h | 1 |
11 files changed, 40 insertions, 7 deletions
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 9f4e286f3a..166d29ef2c 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -62,6 +62,7 @@ sigc::signal<void,RouteGroup*> GainMeterBase::ResetGroupPeakDisplays; GainMeter::MetricPatterns GainMeter::metric_patterns; Glib::RefPtr<Gdk::Pixbuf> GainMeter::slider; +Glib::RefPtr<Gdk::Pixbuf> GainMeter::slider_desensitised; void @@ -70,10 +71,15 @@ GainMeter::setup_slider_pix () if ((slider = ::get_icon ("fader_belt")) == 0) { throw failed_constructor(); } + + if ((slider_desensitised = ::get_icon ("fader_belt_desensitised")) == 0) { + throw failed_constructor(); + } } GainMeterBase::GainMeterBase (Session* s, const Glib::RefPtr<Gdk::Pixbuf>& pix, + const Glib::RefPtr<Gdk::Pixbuf>& pix_desensitised, bool horizontal, int fader_length) : gain_adjustment (gain_to_slider_position_with_max (1.0, Config->get_max_gain()), 0.0, 1.0, 0.01, 0.1) @@ -95,11 +101,13 @@ GainMeterBase::GainMeterBase (Session* s, if (horizontal) { gain_slider = manage (new HSliderController (pix, + pix_desensitised, &gain_adjustment, fader_length, false)); } else { gain_slider = manage (new VSliderController (pix, + pix_desensitised, &gain_adjustment, fader_length, false)); @@ -839,7 +847,7 @@ GainMeterBase::on_theme_changed() } GainMeter::GainMeter (Session* s, int fader_length) - : GainMeterBase (s, slider, false, fader_length) + : GainMeterBase (s, slider, slider_desensitised, false, fader_length) , gain_display_box(true, 0) , hbox(true, 2) { diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h index e706606c76..4536bb691b 100644 --- a/gtk2_ardour/gain_meter.h +++ b/gtk2_ardour/gain_meter.h @@ -65,7 +65,7 @@ namespace Gtk { class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr { public: - GainMeterBase (ARDOUR::Session*, const Glib::RefPtr<Gdk::Pixbuf>& pix, + GainMeterBase (ARDOUR::Session*, const Glib::RefPtr<Gdk::Pixbuf>&, const Glib::RefPtr<Gdk::Pixbuf> &, bool horizontal, int); virtual ~GainMeterBase (); @@ -231,6 +231,7 @@ class GainMeter : public GainMeterBase, public Gtk::VBox std::vector<ARDOUR::DataType> _types; static Glib::RefPtr<Gdk::Pixbuf> slider; + static Glib::RefPtr<Gdk::Pixbuf> slider_desensitised; }; #endif /* __ardour_gtk_gain_meter_h__ */ diff --git a/gtk2_ardour/icons/fader_belt_desensitised.png b/gtk2_ardour/icons/fader_belt_desensitised.png Binary files differnew file mode 100644 index 0000000000..9c7094e039 --- /dev/null +++ b/gtk2_ardour/icons/fader_belt_desensitised.png diff --git a/gtk2_ardour/icons/fader_belt_h_desensitised.png b/gtk2_ardour/icons/fader_belt_h_desensitised.png Binary files differnew file mode 100644 index 0000000000..d2952d051e --- /dev/null +++ b/gtk2_ardour/icons/fader_belt_h_desensitised.png diff --git a/gtk2_ardour/icons/fader_belt_h_thin_desensitised.png b/gtk2_ardour/icons/fader_belt_h_thin_desensitised.png Binary files differnew file mode 100644 index 0000000000..c92f38f679 --- /dev/null +++ b/gtk2_ardour/icons/fader_belt_h_thin_desensitised.png diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index 3e1fa73ca3..ca8fa0a2cf 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -176,7 +176,13 @@ FaderOption::FaderOption (string const & i, string const & n, sigc::slot<gain_t> throw failed_constructor (); } + _pix_desensitised = ::get_icon (X_("fader_belt_h_desensitised")); + if (_pix_desensitised == 0) { + throw failed_constructor (); + } + _db_slider = manage (new HSliderController (_pix, + _pix_desensitised, &_db_adjustment, 115, false)); diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h index c70e6c6bab..5d6a48a024 100644 --- a/gtk2_ardour/option_editor.h +++ b/gtk2_ardour/option_editor.h @@ -362,6 +362,7 @@ private: Gtk::Adjustment _db_adjustment; Gtkmm2ext::HSliderController* _db_slider; Glib::RefPtr<Gdk::Pixbuf> _pix; + Glib::RefPtr<Gdk::Pixbuf> _pix_desensitised; Gtk::Entry _db_display; Gtk::Label _label; Gtk::HBox _box; diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index d9c21dcc9b..c698aeed06 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -91,6 +91,7 @@ RefPtr<Action> ProcessorBox::rename_action; RefPtr<Action> ProcessorBox::edit_action; RefPtr<Action> ProcessorBox::edit_generic_action; Glib::RefPtr<Gdk::Pixbuf> ProcessorEntry::_slider_pixbuf; +Glib::RefPtr<Gdk::Pixbuf> ProcessorEntry::_slider_pixbuf_desensitised; ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processor> p, Width w) : _button (ArdourButton::led_default_elements) @@ -121,7 +122,13 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo set<Evoral::Parameter> p = _processor->what_can_be_automated (); for (set<Evoral::Parameter>::iterator i = p.begin(); i != p.end(); ++i) { - Control* c = new Control (_slider_pixbuf, _processor->automation_control (*i), _processor->describe_parameter (*i)); + Control* c = new Control ( + _slider_pixbuf, + _slider_pixbuf_desensitised, + _processor->automation_control (*i), + _processor->describe_parameter (*i) + ); + _controls.push_back (c); if (boost::dynamic_pointer_cast<Amp> (_processor) == 0) { @@ -301,6 +308,8 @@ ProcessorEntry::setup_slider_pix () { _slider_pixbuf = ::get_icon ("fader_belt_h_thin"); assert (_slider_pixbuf); + _slider_pixbuf_desensitised = ::get_icon ("fader_belt_h_thin_desensitised"); + assert (_slider_pixbuf_desensitised); } void @@ -398,10 +407,10 @@ ProcessorEntry::toggle_control_visibility (Control* c) _parent->update_gui_object_state (this); } -ProcessorEntry::Control::Control (Glib::RefPtr<Gdk::Pixbuf> s, boost::shared_ptr<AutomationControl> c, string const & n) +ProcessorEntry::Control::Control (Glib::RefPtr<Gdk::Pixbuf> s, Glib::RefPtr<Gdk::Pixbuf> sd, boost::shared_ptr<AutomationControl> c, string const & n) : _control (c) , _adjustment (gain_to_slider_position_with_max (1.0, Config->get_max_gain()), 0, 1, 0.01, 0.1) - , _slider (s, &_adjustment, 0, false) + , _slider (s, sd, &_adjustment, 0, false) , _button (ArdourButton::Element (ArdourButton::Text | ArdourButton::Indicator)) , _ignore_ui_adjustment (false) , _visible (false) diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 0e6582bb2f..a8a84e636c 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -140,6 +140,7 @@ protected: virtual void setup_visuals (); static Glib::RefPtr<Gdk::Pixbuf> _slider_pixbuf; + static Glib::RefPtr<Gdk::Pixbuf> _slider_pixbuf_desensitised; private: void led_clicked(); @@ -157,7 +158,7 @@ private: class Control { public: - Control (Glib::RefPtr<Gdk::Pixbuf>, boost::shared_ptr<ARDOUR::AutomationControl>, std::string const &); + Control (Glib::RefPtr<Gdk::Pixbuf>, Glib::RefPtr<Gdk::Pixbuf>, boost::shared_ptr<ARDOUR::AutomationControl>, std::string const &); void set_pixel_width (int); void set_visible (bool); diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index d1a97630d5..fc898b8f75 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -86,6 +86,7 @@ using namespace std; using std::list; Glib::RefPtr<Gdk::Pixbuf> RouteTimeAxisView::slider; +Glib::RefPtr<Gdk::Pixbuf> RouteTimeAxisView::slider_desensitised; void RouteTimeAxisView::setup_slider_pix () @@ -93,6 +94,10 @@ RouteTimeAxisView::setup_slider_pix () if ((slider = ::get_icon ("fader_belt_h")) == 0) { throw failed_constructor (); } + + if ((slider_desensitised = ::get_icon ("fader_belt_h_desensitised")) == 0) { + throw failed_constructor (); + } } RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, Canvas& canvas) @@ -112,7 +117,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, Canvas& c , playlist_action_menu (0) , mode_menu (0) , color_mode_menu (0) - , gm (sess, slider, true, 115) + , gm (sess, slider, slider_desensitised, true, 115) { } @@ -124,6 +129,7 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt) gm.set_controls (_route, _route->shared_peak_meter(), _route->amp()); gm.get_level_meter().set_no_show_all(); gm.get_level_meter().setup_meters(50); + gm.update_gain_sensitive (); string str = gui_property ("height"); if (!str.empty()) { diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h index 3cfd8c8774..f18d3361e0 100644 --- a/gtk2_ardour/route_time_axis.h +++ b/gtk2_ardour/route_time_axis.h @@ -296,6 +296,7 @@ protected: GainMeterBase gm; static Glib::RefPtr<Gdk::Pixbuf> slider; + static Glib::RefPtr<Gdk::Pixbuf> slider_desensitised; XMLNode* underlay_xml_node; bool set_underlay_state(); |