Lincoln's patch from #3225 to tweak crossfade rendering.
authorCarl Hetherington <carl@carlh.net>
Sun, 6 Jun 2010 00:55:53 +0000 (00:55 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 6 Jun 2010 00:55:53 +0000 (00:55 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7235 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/crossfade_view.cc

index 823934ef4ed81f821f2d3624a8d5e4225c54d6ea..4743c87ce4d237f649351d43387927ef330410ae 100644 (file)
@@ -108,10 +108,8 @@ CrossfadeView::reset_width_dependent_items (double pixel_width)
 void
 CrossfadeView::set_height (double h)
 {
-       if (h <= TimeAxisView::preset_height (HeightSmall)) {
-               h -= 3.0;
-       } else {
-               h -= NAME_HIGHLIGHT_SIZE + 3.0;
+       if (h > TimeAxisView::preset_height (HeightSmall)) {
+               h -= NAME_HIGHLIGHT_SIZE;
        }
 
        TimeAxisViewItem::set_height (h);
@@ -183,8 +181,8 @@ CrossfadeView::redraw_curves ()
 
        for (int i = 0, pci = 0; i < npoints; ++i) {
                Art::Point &p = (*points)[pci++];
-               p.set_x(i);
-               p.set_y(2.0 + _height - (_height * vec[i]));
+               p.set_x (i + 1);
+               p.set_y (_height - ((_height - 2) * vec[i]));
        }
        
        fade_in->property_points() = *points;
@@ -193,8 +191,8 @@ CrossfadeView::redraw_curves ()
 
        for (int i = 0, pci = 0; i < npoints; ++i) {
                Art::Point &p = (*points)[pci++];
-               p.set_x(i);
-               p.set_y(2.0 + _height - (_height * vec[i]));
+               p.set_x (i + 1);
+               p.set_y (_height - ((_height - 2) * vec[i]));
        }
        
        fade_out->property_points() = *points;