diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-25 11:35:55 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-25 12:02:50 -0500 |
commit | 0bcf3001f5d071dacb9231be4f9956cfd4bb93d3 (patch) | |
tree | 7bb182a34015cfeef9b8e7df3e9c93ea74f819c3 /gtk2_ardour/audio_region_view.cc | |
parent | 737aae908af36ef6b4bd7592c514d2fa48638525 (diff) |
fiddle with single pixel adjustments to time axis view item heights; fix region gain envelope visibility
Diffstat (limited to 'gtk2_ardour/audio_region_view.cc')
-rw-r--r-- | gtk2_ardour/audio_region_view.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 23c84dc340..cb1d10b82a 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -449,7 +449,7 @@ void AudioRegionView::setup_fade_handle_positions() { /* position of fade handle offset from the top of the region view */ - double const handle_pos = 1.0; + double const handle_pos = 0.0; if (fade_in_handle) { fade_in_handle->set_y0 (handle_pos); @@ -572,6 +572,8 @@ AudioRegionView::reset_fade_in_shape_width (boost::shared_ptr<AudioRegion> ar, f effective_height = _height; } + effective_height -= 1.0; + Points points; points.assign (npoints, Duple()); @@ -583,7 +585,7 @@ AudioRegionView::reset_fade_in_shape_width (boost::shared_ptr<AudioRegion> ar, f for (pi = 0, pc = 0; pc < npoints; ++pc) { points[pi].x = 1.0 + (pc * xdelta); - points[pi++].y = 1.0 + effective_height - (curve[pc] * effective_height); + points[pi++].y = 1.0 + effective_height - (curve[pc] * effective_height); } /* draw the line */ @@ -653,6 +655,8 @@ AudioRegionView::reset_fade_out_shape_width (boost::shared_ptr<AudioRegion> ar, effective_height = _height; } + effective_height -= 1.0; + /* points *MUST* be in anti-clockwise order */ Points points; @@ -739,7 +743,7 @@ AudioRegionView::redraw_start_xfade_to (boost::shared_ptr<AudioRegion> ar, frame start_xfade_rect->set_data ("regionview", this); } - start_xfade_rect->set (ArdourCanvas::Rect (1.0, 1.0, rect_width, effective_height)); + start_xfade_rect->set (ArdourCanvas::Rect (1.0, 0.0, rect_width, effective_height)); start_xfade_rect->show (); start_xfade_in->set (points); @@ -829,7 +833,7 @@ AudioRegionView::redraw_end_xfade_to (boost::shared_ptr<AudioRegion> ar, framecn end_xfade_rect->set_data ("regionview", this); } - end_xfade_rect->set (ArdourCanvas::Rect (rect_edge, 1.0, rect_edge + rect_width + TimeAxisViewItem::RIGHT_EDGE_SHIFT, effective_height)); + end_xfade_rect->set (ArdourCanvas::Rect (rect_edge, 0.0, rect_edge + rect_width + TimeAxisViewItem::RIGHT_EDGE_SHIFT, effective_height)); end_xfade_rect->show (); end_xfade_in->set (points); @@ -1373,6 +1377,7 @@ AudioRegionView::envelope_active_changed () gain_line->set_line_color (audio_region()->envelope_active() ? ARDOUR_UI::config()->get_canvasvar_GainLine() : ARDOUR_UI::config()->get_canvasvar_GainLineInactive()); + update_envelope_visibility (); } } |