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
This commit is contained in:
parent
667b4bc0e4
commit
7047bd41c6
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue