mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
show values on faders (fixes bug in 55c6165)
This commit is contained in:
parent
58663db374
commit
48bb90eb88
2 changed files with 35 additions and 10 deletions
|
|
@ -40,6 +40,27 @@
|
|||
using namespace ARDOUR;
|
||||
using namespace Gtk;
|
||||
|
||||
AutomationBarController::AutomationBarController (
|
||||
boost::shared_ptr<Automatable> printer,
|
||||
boost::shared_ptr<AutomationControl> ac,
|
||||
Adjustment* adj)
|
||||
: Gtkmm2ext::BarController(*adj, ac)
|
||||
, _printer(printer)
|
||||
, _controllable(ac)
|
||||
{
|
||||
}
|
||||
|
||||
std::string
|
||||
AutomationBarController::get_label (double& xpos)
|
||||
{
|
||||
xpos = 0.5;
|
||||
return _printer->value_as_string (_controllable);
|
||||
}
|
||||
|
||||
AutomationBarController::~AutomationBarController()
|
||||
{
|
||||
}
|
||||
|
||||
AutomationController::AutomationController(boost::shared_ptr<Automatable> printer,
|
||||
boost::shared_ptr<AutomationControl> ac,
|
||||
Adjustment* adj)
|
||||
|
|
@ -67,7 +88,7 @@ AutomationController::AutomationController(boost::shared_ptr<Automatable>
|
|||
|
||||
_widget = but;
|
||||
} else {
|
||||
Gtkmm2ext::BarController* bar = manage(new Gtkmm2ext::BarController(*adj, ac));
|
||||
AutomationBarController* bar = manage(new AutomationBarController(_printer, ac, adj));
|
||||
|
||||
bar->set_name(X_("ProcessorControlSlider"));
|
||||
bar->StartGesture.connect(
|
||||
|
|
@ -124,13 +145,6 @@ AutomationController::create(boost::shared_ptr<Automatable> printer,
|
|||
return boost::shared_ptr<AutomationController>(new AutomationController(printer, ac, adjustment));
|
||||
}
|
||||
|
||||
std::string
|
||||
AutomationController::get_label (double& xpos)
|
||||
{
|
||||
xpos = 0.5;
|
||||
return _printer->value_as_string (_controllable);
|
||||
}
|
||||
|
||||
void
|
||||
AutomationController::display_effective_value()
|
||||
{
|
||||
|
|
@ -314,7 +328,7 @@ AutomationController::stop_updating ()
|
|||
void
|
||||
AutomationController::disable_vertical_scroll ()
|
||||
{
|
||||
Gtkmm2ext::BarController* bar = dynamic_cast<Gtkmm2ext::BarController*>(_widget);
|
||||
AutomationBarController* bar = dynamic_cast<AutomationBarController*>(_widget);
|
||||
if (bar) {
|
||||
bar->set_tweaks (
|
||||
Gtkmm2ext::PixFader::Tweaks(bar->tweaks() |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue