summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-04-07 01:11:31 +0000
committerCarl Hetherington <carl@carlh.net>2010-04-07 01:11:31 +0000
commit8057a347786cfe4ebb1af157dee5454fe561f5e3 (patch)
treecb933f162dcdbc7412ffceb059ae8b69f4ccb56c
parent8e22163b6f7d94b67901d4ebcf99dda28807771f (diff)
Fix crossfade height in stacked mode.
git-svn-id: svn://localhost/ardour2/branches/3.0@6868 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/crossfade_view.cc26
-rw-r--r--gtk2_ardour/crossfade_view.h4
2 files changed, 4 insertions, 26 deletions
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;
diff --git a/gtk2_ardour/crossfade_view.h b/gtk2_ardour/crossfade_view.h
index 610fa92e0e..6bda06999d 100644
--- a/gtk2_ardour/crossfade_view.h
+++ b/gtk2_ardour/crossfade_view.h
@@ -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;