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:
authorDominik Fill <dominikfill>2022-02-08 06:55:02 +0300
committerCampbell Barton <campbell@blender.org>2022-02-08 06:55:02 +0300
commit7047bd41c6f4aa3b2c34909e00fcfdb6fca44c9c (patch)
tree050cc96678b2e874118959d612671315b6b25742 /source/blender/editors/space_node/node_draw.cc
parent667b4bc0e424fe7d61e4f0c7a2168675ed5fa39c (diff)
UI: Change computation of node socket position to align with label
This Diff changes the computation of the input and output socket position to being always aligned with its corresponding label. Reviewed By: campbellbarton Ref D14025
Diffstat (limited to 'source/blender/editors/space_node/node_draw.cc')
-rw-r--r--source/blender/editors/space_node/node_draw.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 81c63e9bddb..2ab0a3fff44 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -397,7 +397,7 @@ static void node_update_basis(const bContext &C, bNodeTree &ntree, bNode &node,
/* Round the socket location to stop it from jiggling. */
nsock->locx = round(loc.x + NODE_WIDTH(node));
- nsock->locy = round(0.5f * (dy + buty));
+ nsock->locy = round(dy - NODE_DYS);
dy = buty;
if (nsock->next) {
@@ -527,7 +527,7 @@ static void node_update_basis(const bContext &C, bNodeTree &ntree, bNode &node,
nsock->locx = loc.x;
/* Round the socket vertical position to stop it from jiggling. */
- nsock->locy = round(0.5f * (dy + buty));
+ nsock->locy = round(dy - NODE_DYS);
dy = buty - multi_input_socket_offset * 0.5;
if (nsock->next) {