UI: fix too wide resize area on edges of nodes, interfering with content.
authorHarley Acheson <harley>
Fri, 4 Jan 2019 14:08:24 +0000 (15:08 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 4 Jan 2019 14:14:21 +0000 (15:14 +0100)
Differential Revision: https://developer.blender.org/D3997

source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_intern.h

index 10ec293082f0271d46464b05b55bf7b425f450d0..ec47d140193395e5fb66923a44a0e2868cc3bf92 100644 (file)
@@ -270,7 +270,7 @@ static int node_resize_area_default(bNode *node, int x, int y)
                        return 0;
        }
        else {
-               const float size = 10.0f;
+               const float size = NODE_RESIZE_MARGIN;
                rctf totr = node->totr;
                int dir = 0;
 
index 78d01123d0ce5007e6a7e20bdecd6739cec4fad9..9cff6b7880ec4b1f8e1aa7d96a8123e4ed6481c4 100644 (file)
@@ -245,6 +245,7 @@ extern const char *node_context_dir[];
 #define NODE_HEIGHT(node) (node->height * UI_DPI_FAC)
 #define NODE_MARGIN_X   (0.75f * U.widget_unit)
 #define NODE_SOCKSIZE   (0.25f * U.widget_unit)
+#define NODE_RESIZE_MARGIN (0.20f * U.widget_unit)
 #define NODE_LINK_RESOL 12
 
 // XXX button events (butspace)