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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-25 15:59:11 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-25 16:28:29 +0300
commit0195aad6da223f0b343753ccc0aeb7c562a74bb4 (patch)
treedd6c95fb637b917e7cb5bc9de6fad99713d3c204 /source/blender/editors/space_node
parent489c015e706cf3bcfd246a2a081664d290ec7096 (diff)
Fix T61577: collapse nodes hide arrow hit zone overlaps with node sockets.
Patch by EitanSomething. Differential Revision: https://developer.blender.org/D4423
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/node_draw.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index b2ae7cac41e..afef027f7e1 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -946,18 +946,18 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
/* open/close entirely? */
{
uiBut *but;
- int but_size = UI_UNIT_X * 1.2f;
+ int but_size = U.widget_unit * 0.8f;
/* XXX button uses a custom triangle draw below, so make it invisible without icon */
UI_block_emboss_set(node->block, UI_EMBOSS_NONE);
but = uiDefBut(node->block, UI_BTYPE_BUT_TOGGLE, B_REDR, "",
- rct->xmin + 0.6f * U.widget_unit - but_size / 2, rct->ymax - NODE_DY / 2.2f - but_size / 2,
+ rct->xmin + 0.35f * U.widget_unit, rct->ymax - NODE_DY / 2.2f - but_size / 2,
but_size, but_size, NULL, 0, 0, 0, 0, "");
UI_but_func_set(but, node_toggle_button_cb, node, (void *)"NODE_OT_hide_toggle");
UI_block_emboss_set(node->block, UI_EMBOSS);
UI_GetThemeColor4fv(TH_TEXT, color);
/* custom draw function for this button */
- UI_draw_icon_tri(rct->xmin + 0.6f * U.widget_unit, rct->ymax - NODE_DY / 2.2f, 'v', color);
+ UI_draw_icon_tri(rct->xmin + 0.65f * U.widget_unit, rct->ymax - NODE_DY / 2.2f, 'v', color);
}
nodeLabel(ntree, node, showname, sizeof(showname));
@@ -1069,18 +1069,18 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
/* open entirely icon */
{
uiBut *but;
- int but_size = UI_UNIT_X * 1.2f;
+ int but_size = U.widget_unit * 0.8f;
/* XXX button uses a custom triangle draw below, so make it invisible without icon */
UI_block_emboss_set(node->block, UI_EMBOSS_NONE);
but = uiDefBut(node->block, UI_BTYPE_BUT_TOGGLE, B_REDR, "",
- rct->xmin + 10.0f - but_size / 2, centy - but_size / 2,
+ rct->xmin + 0.35f * U.widget_unit, centy - but_size / 2,
but_size, but_size, NULL, 0, 0, 0, 0, "");
UI_but_func_set(but, node_toggle_button_cb, node, (void *)"NODE_OT_hide_toggle");
UI_block_emboss_set(node->block, UI_EMBOSS);
UI_GetThemeColor4fv(TH_TEXT, color);
/* custom draw function for this button */
- UI_draw_icon_tri(rct->xmin + 10.0f, centy, 'h', color);
+ UI_draw_icon_tri(rct->xmin + 0.65f * U.widget_unit, centy, 'h', color);
}
/* disable lines */