summaryrefslogtreecommitdiff
path: root/gtk2_ardour/audio_region_view.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-07-10 17:19:17 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-07-10 17:19:17 +0000
commit9a3d9dcb3c37dbf2540318d3ff90b805985a449f (patch)
tree704819cd970f2b637137c3723c9e157abe8b5b44 /gtk2_ardour/audio_region_view.cc
parent43c850cdf3bdc88e624a431a7fbd42e3e85fc7d3 (diff)
outline fade in/out handles in black (#3828)
git-svn-id: svn://localhost/ardour2/branches/3.0@13014 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_region_view.cc')
-rw-r--r--gtk2_ardour/audio_region_view.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index a5688b9fc1..83015c9f63 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -66,6 +66,7 @@ using namespace Editing;
using namespace ArdourCanvas;
static const int32_t sync_mark_width = 9;
+static double const handle_size = 6; /* height of fade handles */
AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &tv, boost::shared_ptr<AudioRegion> r, double spu,
Gdk::Color const & basic_color)
@@ -167,13 +168,13 @@ AudioRegionView::init (Gdk::Color const & basic_color, bool wfd)
if (!_recregion) {
fade_in_handle = new ArdourCanvas::SimpleRect (*group);
fade_in_handle->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (fill_color, 0);
- fade_in_handle->property_outline_pixels() = 0;
+ fade_in_handle->property_outline_color_rgba() = RGBA_TO_UINT (0, 0, 0, 0);
fade_in_handle->set_data ("regionview", this);
fade_out_handle = new ArdourCanvas::SimpleRect (*group);
fade_out_handle->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (fill_color, 0);
- fade_out_handle->property_outline_pixels() = 0;
+ fade_out_handle->property_outline_color_rgba() = RGBA_TO_UINT (0, 0, 0, 0);
fade_out_handle->set_data ("regionview", this);
@@ -454,17 +455,15 @@ AudioRegionView::setup_fade_handle_positions()
{
/* position of fade handle offset from the top of the region view */
double const handle_pos = 2;
- /* height of fade handles */
- double const handle_height = 5;
if (fade_in_handle) {
fade_in_handle->property_y1() = handle_pos;
- fade_in_handle->property_y2() = handle_pos + handle_height;
+ fade_in_handle->property_y2() = handle_pos + handle_size;
}
if (fade_out_handle) {
fade_out_handle->property_y1() = handle_pos;
- fade_out_handle->property_y2() = handle_pos + handle_height;
+ fade_out_handle->property_y2() = handle_pos + handle_size;
}
}
@@ -596,7 +595,7 @@ AudioRegionView::reset_fade_in_shape_width (framecnt_t width)
/* Put the fade in handle so that its left side is at the end-of-fade line */
fade_in_handle->property_x1() = handle_center;
- fade_in_handle->property_x2() = handle_center + 6;
+ fade_in_handle->property_x2() = handle_center + handle_size;
if (pwidth < 5) {
fade_in_shape->hide();
@@ -1148,7 +1147,9 @@ AudioRegionView::entered (bool internal_editing)
}
if (fade_in_handle && !internal_editing) {
+ fade_in_handle->property_outline_color_rgba() = RGBA_TO_UINT (0, 0, 0, 255);
fade_in_handle->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (fade_color, 255);
+ fade_out_handle->property_outline_color_rgba() = RGBA_TO_UINT (0, 0, 0, 255);
fade_out_handle->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (fade_color, 255);
}
}
@@ -1164,7 +1165,9 @@ AudioRegionView::exited ()
}
if (fade_in_handle) {
+ fade_in_handle->property_outline_color_rgba() = RGBA_TO_UINT (0, 0, 0, 0);
fade_in_handle->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (fade_color, 0);
+ fade_out_handle->property_outline_color_rgba() = RGBA_TO_UINT (0, 0, 0, 0);
fade_out_handle->property_fill_color_rgba() = UINT_RGBA_CHANGE_A (fade_color, 0);
}
}