Keep automation lines within their parent (#6215).
authorDavid Robillard <d@drobilla.net>
Thu, 26 Mar 2015 15:48:13 +0000 (11:48 -0400)
committerDavid Robillard <d@drobilla.net>
Thu, 26 Mar 2015 15:48:13 +0000 (11:48 -0400)
gtk2_ardour/automation_line.cc
gtk2_ardour/automation_region_view.cc
gtk2_ardour/automation_time_axis.cc

index d5ed529ad882adca59efd0bfd8fb0746b0ea46e9..ed0321a2d716218a0cc12461c1792dddb82d71e6 100644 (file)
@@ -105,7 +105,7 @@ AutomationLine::AutomationLine (const string&                              name,
        terminal_points_can_slide = true;
        _height = 0;
 
-       group = new ArdourCanvas::Container (&parent);
+       group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple(0, 1.5));
        CANVAS_DEBUG_NAME (group, "region gain envelope group");
 
        line = new ArdourCanvas::PolyLine (group);
index 38a98aac7207fa54cdf869c6786c3c509d6b6b73..7e330949de8b877d9b7a16867ad21f19b6a6fde8 100644 (file)
@@ -96,7 +96,7 @@ AutomationRegionView::create_line (boost::shared_ptr<ARDOUR::AutomationList> lis
                                _parameter,
                                &_source_relative_time_converter));
        _line->set_colors();
-       _line->set_height ((uint32_t)rint(trackview.current_height() - NAME_HIGHLIGHT_SIZE));
+       _line->set_height ((uint32_t)rint(trackview.current_height() - 2.5 - NAME_HIGHLIGHT_SIZE));
        _line->set_visibility (AutomationLine::VisibleAspects (AutomationLine::Line|AutomationLine::ControlPoints));
        _line->set_maximum_time (_region->length());
        _line->set_offset (_region->start ());
@@ -235,7 +235,7 @@ AutomationRegionView::set_height (double h)
        RegionView::set_height(h);
 
        if (_line) {
-               _line->set_height ((uint32_t)rint(h - NAME_HIGHLIGHT_SIZE));
+               _line->set_height ((uint32_t)rint(h - 2.5 - NAME_HIGHLIGHT_SIZE));
        }
 }
 
index 5798344b8a63416a692f8bea103d9e02c0eff337..12876c1abb6715c3c931ee99f947319d35e84b66 100644 (file)
@@ -465,7 +465,7 @@ AutomationTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
        _base_rect->set_y1 (h);
 
        if (_line) {
-               _line->set_height(h);
+               _line->set_height(h - 2.5);
        }
 
        if (_view) {