Add tooltips to plugin controls in the processor box
(#4697). git-svn-id: svn://localhost/ardour2/branches/3.0@11741 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a4c27ff16e
commit
ed12f85c88
@ -445,6 +445,29 @@ ProcessorEntry::Control::Control (Glib::RefPtr<Gdk::Pixbuf> s, boost::shared_ptr
|
||||
}
|
||||
|
||||
control_changed ();
|
||||
set_tooltip ();
|
||||
}
|
||||
|
||||
void
|
||||
ProcessorEntry::Control::set_tooltip ()
|
||||
{
|
||||
boost::shared_ptr<AutomationControl> c = _control.lock ();
|
||||
|
||||
if (!c) {
|
||||
return;
|
||||
}
|
||||
|
||||
stringstream s;
|
||||
s << _name << ": ";
|
||||
if (c->toggled ()) {
|
||||
s << (c->get_value() > 0.5 ? _("on") : _("off"));
|
||||
} else {
|
||||
s << c->internal_to_interface (c->get_value ());
|
||||
}
|
||||
|
||||
ARDOUR_UI::instance()->set_tip (_label, s.str ());
|
||||
ARDOUR_UI::instance()->set_tip (_slider, s.str ());
|
||||
ARDOUR_UI::instance()->set_tip (_button, s.str ());
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -181,6 +181,7 @@ private:
|
||||
void button_clicked ();
|
||||
void control_changed ();
|
||||
std::string state_id () const;
|
||||
void set_tooltip ();
|
||||
|
||||
boost::weak_ptr<ARDOUR::AutomationControl> _control;
|
||||
/* things for a slider */
|
||||
|
Loading…
Reference in New Issue
Block a user