From 9a3d9dcb3c37dbf2540318d3ff90b805985a449f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 10 Jul 2012 17:19:17 +0000 Subject: [PATCH] outline fade in/out handles in black (#3828) git-svn-id: svn://localhost/ardour2/branches/3.0@13014 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_region_view.cc | 17 ++++++++++------- gtk2_ardour/editor_mouse.cc | 1 - 2 files changed, 10 insertions(+), 8 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 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); } } diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index a6446b67c3..143f18aaae 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -2081,7 +2081,6 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent*, ItemType item_type) ArdourCanvas::SimpleRect *rect = dynamic_cast (item); if (rect) { rect->property_fill_color_rgba() = rv->get_fill_color(); - rect->property_outline_pixels() = 0; } } set_canvas_cursor (current_canvas_cursor);