not quite as many magic numbers when deciding if a group color is too close to black

This commit is contained in:
Paul Davis 2016-05-21 16:34:56 -04:00
parent 63f50b1fc5
commit 4aea553467

View file

@ -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;