group->Event.connect (sigc::mem_fun (*this, &TimeAxisViewItem::canvas_group_event));
fill_color = base_color;
+ _fill_color_name = "region base";
samples_per_pixel = fpp;
frame_position = start;
item_duration = duration;
CANVAS_DEBUG_NAME (frame, string_compose ("frame for %1", get_item_name()));
if (_recregion) {
- frame->set_outline_color (ARDOUR_UI::config()->get_RecordingRect());
+ frame->set_outline_color (ARDOUR_UI::config()->color ("recording rect"));
} else {
- frame->set_outline_color (ARDOUR_UI::config()->get_TimeAxisFrame());
+ frame->set_outline_color (ARDOUR_UI::config()->color ("time axis frame"));
}
}
if (!selection_frame) {
selection_frame = new ArdourCanvas::TimeRectangle (group);
selection_frame->set_fill (false);
- selection_frame->set_outline_color (ARDOUR_UI::config()->get_SelectedTimeAxisFrame());
+ selection_frame->set_outline_color (ARDOUR_UI::config()->color ("selected time axis frame"));
selection_frame->set_ignore_events (true);
}
selection_frame->set (frame->get().shrink (1.0));
return 130;
}
- uint32_t col = ARDOUR_UI::config()->get_FrameBase();
+ uint32_t col = ARDOUR_UI::config()->color_mod (_fill_color_name, _fill_color_name);
return UINT_RGBA_A (col);
}
uint32_t
TimeAxisViewItem::get_fill_color () const
{
- uint32_t f;
- uint32_t o;
-
- o = fill_opacity ();
+ uint32_t f;
+ uint32_t o = fill_opacity ();
if (_selected) {
- f = ARDOUR_UI::config()->get_SelectedFrameBase();
+ f = ARDOUR_UI::config()->color ("selected region base");
if (o == 0) {
/* some condition of this item has set fill opacity to
} else {
if (_recregion) {
- f = ARDOUR_UI::config()->get_RecordingRect();
+ f = ARDOUR_UI::config()->color ("recording rect");
} else {
if ((!Config->get_show_name_highlight() || high_enough_for_name) && !ARDOUR_UI::config()->get_color_regions_using_track_color()) {
- f = ARDOUR_UI::config()->get_FrameBase();
+ f = ARDOUR_UI::config()->color_mod (_fill_color_name, _fill_color_name);
} else {
f = fill_color;
}
set_frame_gradient ();
if (!_recregion) {
- uint32_t f = ARDOUR_UI::config()->get_TimeAxisFrame();
+ uint32_t f = ARDOUR_UI::config()->color ("time axis frame");
if (!rect_visible) {
/* make the frame outline be visible but rather transparent */
v = min (1.0, v * (1.0 - ARDOUR_UI::config()->get_timeline_item_gradient_depth()));
- ArdourCanvas::Color darker = ArdourCanvas::hsv_to_color (h, s, v, a);
+ ArdourCanvas::Color darker = ArdourCanvas::hsva_to_color (h, s, v, a);
stops.push_back (std::make_pair (1.0, darker));
frame->set_gradient (stops, true);
item->set_fill (false);
break;
case GDK_ENTER_NOTIFY:
- if (trackview.editor().effective_mouse_mode() == Editing::MouseObject &&
- !trackview.editor().internal_editing()) {
- /* never set this to be visible in internal
- edit mode. Note, however, that we do need to
- undo visibility (LEAVE_NOTIFY case above) no
- matter what the mode is.
- */
+ if (trackview.editor().effective_mouse_mode() == Editing::MouseObject) {
+ /* Never set this to be visible in other modes. Note, however,
+ that we do need to undo visibility (LEAVE_NOTIFY case above) no
+ matter what the mode is. */
item->set_fill (true);
}
break;
if (!vestigial_frame) {
vestigial_frame = new ArdourCanvas::TimeRectangle (group, ArdourCanvas::Rect (0.0, 0.0, 2.0, trackview.current_height()));
CANVAS_DEBUG_NAME (vestigial_frame, string_compose ("vestigial frame for %1", get_item_name()));
- vestigial_frame->set_outline_color (ARDOUR_UI::config()->get_VestigialFrame());
- vestigial_frame->set_fill_color (ARDOUR_UI::config()->get_VestigialFrame());
+ vestigial_frame->set_outline_color (ARDOUR_UI::config()->color ("vestigial frame"));
+ vestigial_frame->set_fill_color (ARDOUR_UI::config()->color ("vestigial frame"));
vestigial_frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::LEFT|ArdourCanvas::Rectangle::RIGHT));
}