summaryrefslogtreecommitdiff
path: root/gtk2_ardour/crossfade_view.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-21 19:01:50 +0000
committerDavid Robillard <d@drobilla.net>2006-10-21 19:01:50 +0000
commitfedf3d34f32264ac57c6a222b678dc90f2bb1a88 (patch)
treee816c676d12ccc32b7e666792b9a01ab5b5a0367 /gtk2_ardour/crossfade_view.cc
parent7bd41538d951c3e476655df741adfbebbb990bde (diff)
Merged with trunk R992.
Completely untested other than it compiles, runs, and records somewhat (need to merge again). git-svn-id: svn://localhost/ardour2/branches/midi@999 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/crossfade_view.cc')
-rw-r--r--gtk2_ardour/crossfade_view.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/gtk2_ardour/crossfade_view.cc b/gtk2_ardour/crossfade_view.cc
index 49fe40ca63..baf0f2a346 100644
--- a/gtk2_ardour/crossfade_view.cc
+++ b/gtk2_ardour/crossfade_view.cc
@@ -108,8 +108,8 @@ CrossfadeView::reset_width_dependent_items (double pixel_width)
void
CrossfadeView::set_height (double height)
{
- if (height == TimeAxisView::Smaller ||
- height == TimeAxisView::Small)
+ if (height == TimeAxisView::hSmaller ||
+ height == TimeAxisView::hSmall)
TimeAxisViewItem::set_height (height - 3 );
else
TimeAxisViewItem::set_height (height - NAME_HIGHLIGHT_SIZE - 3 );
@@ -149,14 +149,12 @@ CrossfadeView::redraw_curves ()
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.
*/
- switch(get_time_axis_view().height) {
- case TimeAxisView::Smaller:
- case TimeAxisView::Small:
- h = get_time_axis_view().height - 3.0;
- break;
-
- default:
- h = get_time_axis_view().height - NAME_HIGHLIGHT_SIZE - 3.0;
+ double tav_height = get_time_axis_view().height;
+ if (tav_height == TimeAxisView::hSmaller ||
+ tav_height == TimeAxisView::hSmall) {
+ h = tav_height - 3.0;
+ } else {
+ h = tav_height - NAME_HIGHLIGHT_SIZE - 3.0;
}
if (h < 0) {