X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fautomation_line.cc;h=98b87ee6e6c28d38858637d4d3665d1e26adab3c;hb=24d5f1a6249b08a8b21854ecf001be7e07e5bf23;hp=a422bf972331c5e284510b31a8200b481684ff60;hpb=cf52d6e4b40111eb04b244ec054055a4ec15dbe0;p=ardour.git diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index a422bf9723..98b87ee6e6 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -244,7 +244,10 @@ AutomationLine::set_line_color (uint32_t color) { _line_color = color; line->set_outline_color (color); - line->set_fill_color ((color & 0xffff00) + 80); // XXX TODO configurable transparency + + ArdourCanvas::SVAModifier mod = UIConfiguration::instance().modifier ("automation line fill"); + + line->set_fill_color ((color & 0xffffff00) + mod.a()*255); } void @@ -1198,6 +1201,7 @@ AutomationLine::view_to_model_coord_y (double& y) const /* TODO: This should be more generic (use ParameterDescriptor) * or better yet: Controllable -> set_interface(); */ + if ( alist->parameter().type() == GainAutomation || alist->parameter().type() == EnvelopeAutomation || (_desc.logarithmic && _desc.lower == 0. && _desc.upper > _desc.lower)) { @@ -1214,8 +1218,12 @@ AutomationLine::view_to_model_coord_y (double& y) const } else if (alist->parameter().type() == PanAzimuthAutomation || alist->parameter().type() == PanElevationAutomation) { y = 1.0 - y; + y = max ((double) _desc.lower, y); + y = min ((double) _desc.upper, y); } else if (alist->parameter().type() == PanWidthAutomation) { y = 2.0 * y - 1.0; + y = max ((double) _desc.lower, y); + y = min ((double) _desc.upper, y); } else { y = y * (double)(alist->get_max_y() - alist->get_min_y()) + alist->get_min_y(); if (_desc.integer_step) { @@ -1223,6 +1231,8 @@ AutomationLine::view_to_model_coord_y (double& y) const } else if (_desc.toggled) { y = (y > 0.5) ? 1.0 : 0.0; } + y = max ((double) _desc.lower, y); + y = min ((double) _desc.upper, y); } }