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:
authorPablo Vazquez <pablo@blender.org>2021-10-27 02:24:19 +0300
committerPablo Vazquez <pablo@blender.org>2021-10-27 02:24:19 +0300
commit8d8ce6443530ac3e39276c7b7219e2a8ca61040f (patch)
tree8be1d6b876121a9a4fb45a66367787e29fefc908 /source/blender/editors
parentf195a3a30dfe27a5927b0dfa9843c571ae1f1cce (diff)
Nodes: Cleanup setting node header alpha
Always draw header opaque, set transparency only once after getting the color. Helps to unify the color and alpha values.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_node/node_draw.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 429c53d6740..79c2bc8185b 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -1625,10 +1625,10 @@ static void node_draw_basis(const bContext *C,
/* Muted nodes get a mix of the background with the node color. */
if (node->flag & NODE_MUTED) {
- UI_GetThemeColorBlendShade4fv(TH_BACK, color_id, 0.1f, 0, color_header);
+ UI_GetThemeColorBlend4f(TH_BACK, color_id, 0.1f, color_header);
}
else {
- UI_GetThemeColorBlendShade4fv(TH_NODE, color_id, 0.6f, -40, color_header);
+ UI_GetThemeColorBlend4f(TH_NODE, color_id, 0.4f, color_header);
}
UI_draw_roundbox_corner_set(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT);
@@ -1770,11 +1770,11 @@ static void node_draw_basis(const bContext *C,
{
/* Use warning color to indicate undefined types. */
if (nodeTypeUndefined(node)) {
- UI_GetThemeColorBlendShade4fv(TH_REDALERT, color_id, 0.05f, -80, color);
+ UI_GetThemeColorBlend4f(TH_REDALERT, TH_NODE, 0.4f, color);
}
/* Muted nodes get a mix of the background with the node color. */
else if (node->flag & NODE_MUTED) {
- UI_GetThemeColorBlendShade4fv(TH_BACK, TH_NODE, 0.33f, 0, color);
+ UI_GetThemeColorBlend4f(TH_BACK, TH_NODE, 0.2f, color);
}
else if (node->flag & NODE_CUSTOM_COLOR) {
rgba_float_args_set(color, node->color[0], node->color[1], node->color[2], 1.0f);
@@ -1900,7 +1900,7 @@ static void node_draw_hidden(const bContext *C,
{
if (nodeTypeUndefined(node)) {
/* Use warning color to indicate undefined types. */
- UI_GetThemeColorBlendShade4fv(TH_REDALERT, color_id, 0.05f, -80, color);
+ UI_GetThemeColorBlend4f(TH_REDALERT, TH_NODE, 0.4f, color);
}
else if (node->flag & NODE_MUTED) {
/* Muted nodes get a mix of the background with the node color. */
@@ -1910,7 +1910,7 @@ static void node_draw_hidden(const bContext *C,
rgba_float_args_set(color, node->color[0], node->color[1], node->color[2], 1.0f);
}
else {
- UI_GetThemeColorBlendShade4fv(TH_NODE, color_id, 0.6f, -40, color);
+ UI_GetThemeColorBlend4f(TH_NODE, color_id, 0.4f, color);
}
/* Draw selected nodes fully opaque. */