diff options
author | David Robillard <d@drobilla.net> | 2014-12-16 20:37:16 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-18 20:23:34 -0500 |
commit | 60313085209a6213a7388e0b1070c10e83fe2a10 (patch) | |
tree | 8838eac295e2079cc1c2b28defb0819a6271e3ca /gtk2_ardour/time_axis_view_item.cc | |
parent | a12a065457a10d9be2582f3ad2fcee7178405981 (diff) |
Use color modifiers for dynamic region styles.
Diffstat (limited to 'gtk2_ardour/time_axis_view_item.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view_item.cc | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index 8c38293442..35a1e33138 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -692,48 +692,29 @@ TimeAxisViewItem::set_name_text_color () } uint32_t -TimeAxisViewItem::fill_opacity () const -{ - if (_dragging) { - return 130; - } - - 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 = fill_opacity (); + const std::string mod_name = (_dragging ? "dragging region" : _fill_color_name); if (_selected) { - f = ARDOUR_UI::config()->color ("selected region base"); + f = ARDOUR_UI::config()->color_mod ("selected region base", mod_name); - if (o == 0) { - /* some condition of this item has set fill opacity to - * zero, but it has been selected, so use a mid-way - * alpha value to make it reasonably visible. - */ - o = 130; - } - } else { if (_recregion) { 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()->color_mod (_fill_color_name, _fill_color_name); + f = ARDOUR_UI::config()->color_mod (_fill_color_name, mod_name); } else { - f = fill_color; + f = ARDOUR_UI::config()->color_mod (fill_color, mod_name); } } } - return UINT_RGBA_CHANGE_A (f, o); + return f; } /** |