Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYevgeny Makarov <jenkm>2021-11-12 19:51:31 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-11-12 19:55:20 +0300
commita89529d8dbecffa663b3c23c621354f61e2ea292 (patch)
tree27f9d7c4ebab12ebb11a556e5010d74c43507b83 /source/blender/editors/interface
parent9f5290e3bc5624154839f3a3771f6f14eea20322 (diff)
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
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/resources.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index aece2e58f1e..d960f5e6b1d 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -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;