X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fregion_view.cc;h=735e5dd09c36d81779c5a3803c7ad3886b309090;hb=01d99870ffdefa1a76093c95250f355db11609d1;hp=01df05a5c79d49ffdccef9d0b09a50b80d4d1240;hpb=94b6dd7f87653ad41b4a6e6d37a5326472a66d51;p=ardour.git diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 01df05a5c7..735e5dd09c 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -18,7 +18,6 @@ */ #include -#include #include #include @@ -511,34 +510,37 @@ RegionView::set_duration (framecnt_t frames, void *src) return true; } -uint32_t -RegionView::fill_opacity () const -{ - if (!_region->opaque()) { - return 60; - } - - uint32_t normal_tavi_opacity = TimeAxisViewItem::fill_opacity (); - - return normal_tavi_opacity; -} - void RegionView::set_colors () { TimeAxisViewItem::set_colors (); + set_sync_mark_color (); +} +void +RegionView::set_sync_mark_color () +{ if (sync_mark) { - /* XXX: make these colours themable */ - sync_mark->set_fill_color (ArdourCanvas::rgba_to_color (0, 1.0, 0, 1.0)); - sync_line->set_outline_color (ArdourCanvas::rgba_to_color (0, 1.0, 0, 1.0)); + ArdourCanvas::Color c = ARDOUR_UI::config()->color ("sync mark"); + sync_mark->set_fill_color (c); + sync_mark->set_outline_color (c); + sync_line->set_outline_color (c); } } -void -RegionView::set_frame_color () +uint32_t +RegionView::get_fill_color () const { - TimeAxisViewItem::set_frame_color (); + ArdourCanvas::Color f = TimeAxisViewItem::get_fill_color(); + char const *modname; + + if (_region->opaque()) { + modname = "opaque region base"; + } else { + modname = "transparent region base"; + } + + return HSV(f).mod (ARDOUR_UI::config()->modifier (modname)).color (); } void @@ -623,11 +625,10 @@ RegionView::region_sync_changed () sync_mark = new ArdourCanvas::Polygon (group); CANVAS_DEBUG_NAME (sync_mark, string_compose ("sync mark for %1", get_item_name())); - sync_mark->set_fill_color (ArdourCanvas::rgba_to_color (0, 1.0, 0, 1.0)); // FIXME make a themeable colour - sync_line = new ArdourCanvas::Line (group); CANVAS_DEBUG_NAME (sync_line, string_compose ("sync mark for %1", get_item_name())); - sync_line->set_outline_color (ArdourCanvas::rgba_to_color (0, 1.0, 0, 1.0)); // FIXME make a themeable colour + + set_sync_mark_color (); } /* this has to handle both a genuine change of position, a change of samples_per_pixel @@ -783,7 +784,7 @@ RegionView::update_coverage_frames (LayerDisplay d) bool me = false; /* the color that will be used to show parts of regions that will not be heard */ - uint32_t const non_playing_color = ARDOUR_UI::config()->color ("covered region"); + uint32_t const non_playing_color = ARDOUR_UI::config()->color_mod ("covered region", "covered region base"); while (t < end) {