diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-21 16:34:56 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:44 -0400 |
commit | 4aea553467a04e5cb88f63893a09c0d1dc80309d (patch) | |
tree | ac1bdac3934d809837ae84829a7522b1e45f70ee /gtk2_ardour/group_tabs.cc | |
parent | 63f50b1fc570d6a9dc9dcfc8b51d82828f9556e6 (diff) |
not quite as many magic numbers when deciding if a group color is too close to black
Diffstat (limited to 'gtk2_ardour/group_tabs.cc')
-rw-r--r-- | gtk2_ardour/group_tabs.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc index d0e1763d04..c78521e669 100644 --- a/gtk2_ardour/group_tabs.cc +++ b/gtk2_ardour/group_tabs.cc @@ -760,11 +760,12 @@ GroupTabs::set_group_color (RouteGroup* group, uint32_t color) UINT_TO_RGBA (color, &r, &g, &b, &a); /* Hack to disallow black route groups; force a dark grey instead */ + const uint32_t dark_gray = 25; - if (r == 0 && g == 0 && b == 0) { - r = 25; - g = 25; - b = 25; + if (r < dark_gray && g < dark_gray && b < dark_gray) { + r = dark_gray; + g = dark_gray; + b = dark_gray; } GUIObjectState& gui_state = *ARDOUR_UI::instance()->gui_object_state; |