mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
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
2 changed files with 24 additions and 0 deletions
|
|
@ -445,6 +445,29 @@ ProcessorEntry::Control::Control (Glib::RefPtr<Gdk::Pixbuf> s, boost::shared_ptr
|
||||||
}
|
}
|
||||||
|
|
||||||
control_changed ();
|
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
|
void
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,7 @@ private:
|
||||||
void button_clicked ();
|
void button_clicked ();
|
||||||
void control_changed ();
|
void control_changed ();
|
||||||
std::string state_id () const;
|
std::string state_id () const;
|
||||||
|
void set_tooltip ();
|
||||||
|
|
||||||
boost::weak_ptr<ARDOUR::AutomationControl> _control;
|
boost::weak_ptr<ARDOUR::AutomationControl> _control;
|
||||||
/* things for a slider */
|
/* things for a slider */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue