mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
allow to set toolip on knob
This commit is contained in:
parent
3cdd8fa221
commit
57e80c2c8f
2 changed files with 7 additions and 1 deletions
|
|
@ -377,10 +377,12 @@ ArdourKnob::set_controllable (boost::shared_ptr<Controllable> c)
|
||||||
void
|
void
|
||||||
ArdourKnob::controllable_changed ()
|
ArdourKnob::controllable_changed ()
|
||||||
{
|
{
|
||||||
_val = binding_proxy.get_controllable()->get_interface(); //% of knob travel
|
boost::shared_ptr<PBD::Controllable> c = binding_proxy.get_controllable();
|
||||||
|
|
||||||
|
_val = c->get_interface(); //% of knob travel
|
||||||
_val = min( max(0.0f, _val), 1.0f); //range check
|
_val = min( max(0.0f, _val), 1.0f); //range check
|
||||||
|
|
||||||
|
ARDOUR_UI::instance()->set_tip (*this, _tooltip_prefix + c->get_user_string());
|
||||||
set_dirty();
|
set_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ public:
|
||||||
void add_elements (Element);
|
void add_elements (Element);
|
||||||
static Element default_elements;
|
static Element default_elements;
|
||||||
|
|
||||||
|
void set_tooltip_prefix (std::string pfx) { _tooltip_prefix = pfx; }
|
||||||
|
|
||||||
boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); }
|
boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); }
|
||||||
void set_controllable (boost::shared_ptr<PBD::Controllable> c);
|
void set_controllable (boost::shared_ptr<PBD::Controllable> c);
|
||||||
|
|
||||||
|
|
@ -91,6 +93,8 @@ public:
|
||||||
void action_sensitivity_changed ();
|
void action_sensitivity_changed ();
|
||||||
void action_visibility_changed ();
|
void action_visibility_changed ();
|
||||||
void action_tooltip_changed ();
|
void action_tooltip_changed ();
|
||||||
|
|
||||||
|
std::string _tooltip_prefix;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __gtk2_ardour_ardour_knob_h__ */
|
#endif /* __gtk2_ardour_ardour_knob_h__ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue