outline fade in/out handles in black (#3828)

git-svn-id: svn://localhost/ardour2/branches/3.0@13014 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-07-10 17:19:17 +00:00
parent 43c850cdf3
commit 9a3d9dcb3c
2 changed files with 10 additions and 8 deletions

View File

@ -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);
}
}

View File

@ -2081,7 +2081,6 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent*, ItemType item_type)
ArdourCanvas::SimpleRect *rect = dynamic_cast<ArdourCanvas::SimpleRect *> (item);
if (rect) {
rect->property_fill_color_rgba() = rv->get_fill_color();
rect->property_outline_pixels() = 0;
}
}
set_canvas_cursor (current_canvas_cursor);