From 66be0059e7a27fedb16519a26db1b1c100740f46 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 18 Dec 2010 20:43:00 +0000 Subject: Tweak positioning of fade handles. git-svn-id: svn://localhost/ardour2/branches/3.0@8296 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_region_view.cc | 26 ++++++-------------------- 1 file 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 */ -- cgit v1.2.3