diff options
author | Carl Hetherington <carl@carlh.net> | 2011-08-31 19:14:12 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-08-31 19:14:12 +0000 |
commit | 881b5a43e755860e91bf596bcac1f8c105b0a843 (patch) | |
tree | ea8c1ee2acca440144caa74dc5f6698449278dd8 /gtk2_ardour/route_ui.cc | |
parent | f3a6b8a9bae2c926dd37315793416f14c176bbd8 (diff) |
Allow route groups to color their tracks (remainder of
#4064).
git-svn-id: svn://localhost/ardour2/branches/3.0@10043 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index a1a7f49ebc..fc9d878b83 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -44,6 +44,7 @@ #include "mixer_strip.h" #include "automation_time_axis.h" #include "route_time_axis.h" +#include "group_tabs.h" #include "ardour/route.h" #include "ardour/event_type_map.h" @@ -1809,3 +1810,18 @@ RouteUI::route_gui_changed (string what_changed) } } } + +/** @return the color that this route should use; it maybe its own, + or it maybe that of its route group. +*/ +Gdk::Color +RouteUI::color () const +{ + RouteGroup* g = _route->route_group (); + + if (g && g->is_color()) { + return GroupTabs::group_color (g); + } + + return _color; +} |