summaryrefslogtreecommitdiff
path: root/gtk2_ardour/audio_streamview.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-12-27 01:42:49 +0000
committerCarl Hetherington <carl@carlh.net>2011-12-27 01:42:49 +0000
commit6304261b980419eaafde84bc32ff5e8f1c7aa236 (patch)
tree1261360e5eb22f7539a1a0afcc2d760ea017b7ad /gtk2_ardour/audio_streamview.cc
parent0082e3364f7682ff41df52305cfff2cf7a861ef3 (diff)
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
Diffstat (limited to 'gtk2_ardour/audio_streamview.cc')
-rw-r--r--gtk2_ardour/audio_streamview.cc19
1 files changed, 12 insertions, 7 deletions
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);
+ }
}
}