mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
not quite as many magic numbers when deciding if a group color is too close to black
This commit is contained in:
parent
63f50b1fc5
commit
4aea553467
1 changed files with 5 additions and 4 deletions
|
|
@ -760,11 +760,12 @@ GroupTabs::set_group_color (RouteGroup* group, uint32_t color)
|
||||||
UINT_TO_RGBA (color, &r, &g, &b, &a);
|
UINT_TO_RGBA (color, &r, &g, &b, &a);
|
||||||
|
|
||||||
/* Hack to disallow black route groups; force a dark grey instead */
|
/* Hack to disallow black route groups; force a dark grey instead */
|
||||||
|
const uint32_t dark_gray = 25;
|
||||||
|
|
||||||
if (r == 0 && g == 0 && b == 0) {
|
if (r < dark_gray && g < dark_gray && b < dark_gray) {
|
||||||
r = 25;
|
r = dark_gray;
|
||||||
g = 25;
|
g = dark_gray;
|
||||||
b = 25;
|
b = dark_gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
GUIObjectState& gui_state = *ARDOUR_UI::instance()->gui_object_state;
|
GUIObjectState& gui_state = *ARDOUR_UI::instance()->gui_object_state;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue