diff options
author | Carl Hetherington <carl@carlh.net> | 2010-12-18 20:43:00 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-12-18 20:43:00 +0000 |
commit | 66be0059e7a27fedb16519a26db1b1c100740f46 (patch) | |
tree | 0b243430d37d8acb33f45ac61fc843ed34c4e2c3 /gtk2_ardour/audio_region_view.cc | |
parent | 94c69b3c915c3fa8f8029e514240bca5bdb90def (diff) |
Tweak positioning of fade handles.
git-svn-id: svn://localhost/ardour2/branches/3.0@8296 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_region_view.cc')
-rw-r--r-- | gtk2_ardour/audio_region_view.cc | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 3b98e55151..b69ea8735a 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -599,17 +599,10 @@ AudioRegionView::reset_fade_in_shape_width (framecnt_t width) return; } - double handle_center; - handle_center = pwidth; + double const handle_center = pwidth; - if (handle_center > 7.0) { - handle_center -= 2.0; - } else { - handle_center = 3.0; - } - - fade_in_handle->property_x1() = handle_center - 3.0; - fade_in_handle->property_x2() = handle_center + 3.0; + fade_in_handle->property_x1() = handle_center; + fade_in_handle->property_x2() = handle_center + 6; if (pwidth < 5) { fade_in_shape->hide(); @@ -690,17 +683,10 @@ AudioRegionView::reset_fade_out_shape_width (framecnt_t width) return; } - double handle_center; - handle_center = (_region->length() - width) / samples_per_unit; - - if (handle_center > 7.0) { - handle_center -= 2.0; - } else { - handle_center = 3.0; - } + double const handle_center = (_region->length() - width) / samples_per_unit; - fade_out_handle->property_x1() = handle_center - 3.0; - fade_out_handle->property_x2() = handle_center + 3.0; + fade_out_handle->property_x1() = handle_center - 6; + fade_out_handle->property_x2() = handle_center; /* don't show shape if its too small */ |