Merge branch 'blender-v3.0-release'

This commit is contained in:
Philipp Oeser 2021-11-04 10:51:40 +01:00
commit 82b20b6975
2 changed files with 12 additions and 10 deletions

View File

@ -254,7 +254,7 @@ static int node_resize_area_default(bNode *node, int x, int y)
if (node->flag & NODE_HIDDEN) {
rctf totr = node->totr;
/* right part of node */
totr.xmin = node->totr.xmax - 20.0f;
totr.xmin = node->totr.xmax - 1.0f * U.widget_unit;
if (BLI_rctf_isect_pt(&totr, x, y)) {
return NODE_RESIZE_RIGHT;
}

View File

@ -2015,25 +2015,27 @@ static void node_draw_hidden(const bContext *C,
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformThemeColorShadeAlpha(TH_TEXT, -40, -180);
float dx = 10.0f;
float dx = 0.5f * U.widget_unit;
const float dx2 = 0.15f * U.widget_unit * snode->runtime->aspect;
const float dy = 0.2f * U.widget_unit;
immBegin(GPU_PRIM_LINES, 4);
immVertex2f(pos, rct->xmax - dx, centy - 4.0f);
immVertex2f(pos, rct->xmax - dx, centy + 4.0f);
immVertex2f(pos, rct->xmax - dx, centy - dy);
immVertex2f(pos, rct->xmax - dx, centy + dy);
immVertex2f(pos, rct->xmax - dx - 3.0f * snode->runtime->aspect, centy - 4.0f);
immVertex2f(pos, rct->xmax - dx - 3.0f * snode->runtime->aspect, centy + 4.0f);
immVertex2f(pos, rct->xmax - dx - dx2, centy - dy);
immVertex2f(pos, rct->xmax - dx - dx2, centy + dy);
immEnd();
immUniformThemeColorShadeAlpha(TH_TEXT, 0, -180);
dx -= snode->runtime->aspect;
immBegin(GPU_PRIM_LINES, 4);
immVertex2f(pos, rct->xmax - dx, centy - 4.0f);
immVertex2f(pos, rct->xmax - dx, centy + 4.0f);
immVertex2f(pos, rct->xmax - dx, centy - dy);
immVertex2f(pos, rct->xmax - dx, centy + dy);
immVertex2f(pos, rct->xmax - dx - 3.0f * snode->runtime->aspect, centy - 4.0f);
immVertex2f(pos, rct->xmax - dx - 3.0f * snode->runtime->aspect, centy + 4.0f);
immVertex2f(pos, rct->xmax - dx - dx2, centy - dy);
immVertex2f(pos, rct->xmax - dx - dx2, centy + dy);
immEnd();
immUnbindProgram();