mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +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);
|
||||
|
||||
/* 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue