Fix crossfade height in stacked mode.
git-svn-id: svn://localhost/ardour2/branches/3.0@6868 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -67,10 +67,6 @@ struct CrossfadeView : public TimeAxisViewItem
|
||||
bool _valid;
|
||||
bool _visible;
|
||||
|
||||
double spu;
|
||||
double _height;
|
||||
|
||||
ArdourCanvas::Item *overlap_rect;
|
||||
ArdourCanvas::Line *fade_in;
|
||||
ArdourCanvas::Line *fade_out;
|
||||
ArdourCanvas::Item *active_button;
|
||||
|
||||
Reference in New Issue
Block a user