X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fcrossfade_view.cc;h=2854de9a782e865e8bb9995fe26769a0e4f1e8be;hb=e33d4553b2b333c30835b00741fc5c1fd0e2b36d;hp=918f081cdbb0556d90fbca49aa2be6ff23e66305;hpb=7c9c3b8f6ccc4c0ebf963b05c2df400864ba46f0;p=ardour.git diff --git a/gtk2_ardour/crossfade_view.cc b/gtk2_ardour/crossfade_view.cc index 918f081cdb..2854de9a78 100644 --- a/gtk2_ardour/crossfade_view.cc +++ b/gtk2_ardour/crossfade_view.cc @@ -68,8 +68,6 @@ CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent, fade_out->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_CrossfadeLine.get(); fade_out->property_width_pixels() = 1; - set_height (get_time_axis_view().current_height()); - /* no frame around the xfade or overlap rects */ frame->property_outline_what() = 0; @@ -108,18 +106,16 @@ CrossfadeView::reset_width_dependent_items (double pixel_width) } void -CrossfadeView::set_height (double height) +CrossfadeView::set_height (double h) { - double h = 0; - if (height <= TimeAxisView::hSmaller) { - TimeAxisViewItem::set_height (height); + if (h <= TimeAxisView::hSmall) { + h -= 3.0; } else { - TimeAxisViewItem::set_height (height - NAME_HIGHLIGHT_SIZE); + h -= NAME_HIGHLIGHT_SIZE + 3.0; } TimeAxisViewItem::set_height (h); - _height = h; redraw_curves (); } @@ -163,20 +159,6 @@ CrossfadeView::redraw_curves () return; } - /* - At "height - 3.0" the bottom of the crossfade touches the name highlight or the bottom of the track (if the - track is either Small or Smaller. - */ - - double tav_height = get_time_axis_view().current_height(); - - if (tav_height == TimeAxisView::hSmaller || - tav_height == TimeAxisView::hSmall) { - _height = tav_height - 3.0; - } else { - _height = tav_height - NAME_HIGHLIGHT_SIZE - 3.0; - } - if (_height < 0) { /* no space allocated yet */ return;