UI: Do not shade alpha when blending colors

UI_GetThemeColorBlendShade4fv incorrectly changing alpha by the amount
of the shading offset.

See D9944 for more details.

Differential Revision: https://developer.blender.org/D9944

Reviewed by Hans Goudey
This commit is contained in:
Yevgeny Makarov 2021-11-12 08:51:31 -08:00 committed by Harley Acheson
parent 9f5290e3bc
commit a89529d8db
1 changed files with 2 additions and 1 deletions

View File

@ -1340,7 +1340,8 @@ void UI_GetThemeColorBlendShade4fv(int colorid1, int colorid2, float fac, int of
CLAMP(g, 0, 255);
b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
CLAMP(b, 0, 255);
a = offset + floorf((1.0f - fac) * cp1[3] + fac * cp2[3]);
a = floorf((1.0f - fac) * cp1[3] + fac * cp2[3]); /* No shading offset. */
CLAMP(a, 0, 255);
col[0] = ((float)r) / 255.0f;