Commit: 386872b98b548fcd9cb753ec8d5f2e07136e4dda
Author: Julian Eisel
Date:   Wed Mar 16 12:51:15 2016 +0100
Branches: master
https://developer.blender.org/rB386872b98b548fcd9cb753ec8d5f2e07136e4dda

Fix text on collapsed node not positioned correctly with high DPI

Reported by @JacquesLucke via IRC, thx!

===================================================================

M       source/blender/editors/space_node/node_draw.c

===================================================================

diff --git a/source/blender/editors/space_node/node_draw.c 
b/source/blender/editors/space_node/node_draw.c
index 85c8f50..d9c51e4 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -1066,7 +1066,7 @@ static void node_draw_hidden(const bContext *C, ARegion 
*ar, SpaceNode *snode, b
                //      BLI_snprintf(showname, sizeof(showname), "[%s]", 
showname); /* XXX - don't print into self! */
 
                uiDefBut(node->block, UI_BTYPE_LABEL, 0, showname,
-                        (int)(rct->xmin + (NODE_MARGIN_X)), (int)(centy - 10),
+                        iroundf(rct->xmin + NODE_MARGIN_X), iroundf(centy - 
NODE_DY * 0.5f),
                         (short)(BLI_rctf_size_x(rct) - 18.0f - 12.0f), 
(short)NODE_DY,
                         NULL, 0, 0, 0, 0, "");
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to