diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index a3b99de3f1..bf2a39a791 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -1571,19 +1571,20 @@ AudioRegionView::redraw_start_xfade_to (boost::shared_ptr ar, frame Points* points = get_canvas_points ("xfade edit redraw", npoints); boost::scoped_ptr vec (new float[npoints]); + double effective_height = _height - NAME_HIGHLIGHT_SIZE; ar->fade_in()->curve().get_vector (0, ar->fade_in()->back()->when, vec.get(), npoints); for (int i = 0, pci = 0; i < npoints; ++i) { Gnome::Art::Point &p ((*points)[pci++]); p.set_x (i); - p.set_y (_height - (_height * vec.get()[i])); + p.set_y (effective_height - (effective_height * vec.get()[i])); } start_xfade_rect->property_x1() = ((*points)[0]).get_x(); start_xfade_rect->property_y1() = 0; start_xfade_rect->property_x2() = ((*points)[npoints-1]).get_x(); - start_xfade_rect->property_y2() = _height; + start_xfade_rect->property_y2() = effective_height; start_xfade_rect->show (); start_xfade_rect->raise_to_top (); @@ -1600,7 +1601,7 @@ AudioRegionView::redraw_start_xfade_to (boost::shared_ptr ar, frame for (int i = 0, pci = 0; i < npoints; ++i) { Gnome::Art::Point &p ((*points)[pci++]); p.set_x (i); - p.set_y (_height - (_height * (1.0 - vec.get()[i]))); + p.set_y (effective_height - (effective_height * (1.0 - vec.get()[i]))); } } else { @@ -1610,7 +1611,7 @@ AudioRegionView::redraw_start_xfade_to (boost::shared_ptr ar, frame for (int i = 0, pci = 0; i < npoints; ++i) { Gnome::Art::Point &p ((*points)[pci++]); p.set_x (i); - p.set_y (_height - (_height * vec.get()[i])); + p.set_y (effective_height - (effective_height * vec.get()[i])); } } @@ -1670,17 +1671,18 @@ AudioRegionView::redraw_end_xfade_to (boost::shared_ptr ar, framecn ar->fade_out()->curve().get_vector (0, ar->fade_out()->back()->when, vec.get(), npoints); double rend = trackview.editor().frame_to_pixel (_region->length() - len); + double effective_height = _height - NAME_HIGHLIGHT_SIZE; for (int i = 0, pci = 0; i < npoints; ++i) { Gnome::Art::Point &p ((*points)[pci++]); p.set_x (rend + i); - p.set_y (_height - (_height * vec.get()[i])); + p.set_y (effective_height - (effective_height * vec.get()[i])); } end_xfade_rect->property_x1() = ((*points)[0]).get_x(); end_xfade_rect->property_y1() = 0; end_xfade_rect->property_x2() = ((*points)[npoints-1]).get_x(); - end_xfade_rect->property_y2() = _height; + end_xfade_rect->property_y2() = effective_height; end_xfade_rect->show (); end_xfade_rect->raise_to_top (); @@ -1703,11 +1705,11 @@ AudioRegionView::redraw_end_xfade_to (boost::shared_ptr ar, framecn } else { inverse->curve().get_vector (inverse->front()->when, inverse->back()->when, vec.get(), npoints); - + for (int i = 0, pci = 0; i < npoints; ++i) { Gnome::Art::Point &p ((*points)[pci++]); p.set_x (rend + i); - p.set_y (_height - (_height * vec.get()[i])); + p.set_y (effective_height - (effective_height * vec.get()[i])); } }