From 6304261b980419eaafde84bc32ff5e8f1c7aa236 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 27 Dec 2011 01:42:49 +0000 Subject: Re-work layering in possibly debatable ways. Sketchy docs in doc/layering. git-svn-id: svn://localhost/ardour2/branches/3.0@11088 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_streamview.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'gtk2_ardour/audio_streamview.cc') diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc index a69f398ef4..6dbef4484d 100644 --- a/gtk2_ardour/audio_streamview.cc +++ b/gtk2_ardour/audio_streamview.cc @@ -809,13 +809,14 @@ AudioStreamView::update_contents_height () void AudioStreamView::update_content_height (CrossfadeView* cv) { - if (_layer_display == Overlaid) { - + switch (_layer_display) { + case Overlaid: cv->set_y (0); cv->set_height (height); + break; - } else { - + case Stacked: + case Expanded: layer_t const inl = cv->crossfade->in()->layer (); layer_t const outl = cv->crossfade->out()->layer (); @@ -824,9 +825,13 @@ AudioStreamView::update_content_height (CrossfadeView* cv) const double h = child_height (); - cv->set_y ((_layers - high - 1) * h); - cv->set_height ((high - low + 1) * h); - + if (_layer_display == Stacked) { + cv->set_y ((_layers - high - 1) * h); + cv->set_height ((high - low + 1) * h); + } else { + cv->set_y (((_layers - high) * 2 - 1) * h); + cv->set_height (((high - low) * 2 + 1) * h); + } } } -- cgit v1.2.3