summaryrefslogtreecommitdiff
path: root/gtk2_ardour/crossfade_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-06-06 00:55:53 +0000
committerCarl Hetherington <carl@carlh.net>2010-06-06 00:55:53 +0000
commite002e5cea15ba91b8e81f8110e1caabddaa4abcb (patch)
tree7f7a4728c06044bedec6a81a1adcdc66e0d594a0 /gtk2_ardour/crossfade_view.cc
parent4065c59ed089a0fb63ed13cfe374fd34781f919d (diff)
Lincoln's patch from #3225 to tweak crossfade rendering.
git-svn-id: svn://localhost/ardour2/branches/3.0@7235 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/crossfade_view.cc')
-rw-r--r--gtk2_ardour/crossfade_view.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/gtk2_ardour/crossfade_view.cc b/gtk2_ardour/crossfade_view.cc
index 823934ef4e..4743c87ce4 100644
--- a/gtk2_ardour/crossfade_view.cc
+++ b/gtk2_ardour/crossfade_view.cc
@@ -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;