diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-03-10 17:58:08 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-03-10 17:58:08 +0300 |
commit | 989632417bfaa08aac61258c55b00eee4a8a5929 (patch) | |
tree | 02fc16e473c1a2e82aa21336bb2aff82be767e4f /source/blender/editors/space_outliner/outliner_draw.c | |
parent | 08cde7c785e38f44af2e3c2584e1f88a31c38782 (diff) |
Draw drag&drop feedback overlays with element indentation
That way users can see better at which hierarchy level the element will
be inserted into.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_draw.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 0b119b5d247..771591240d6 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1528,6 +1528,7 @@ static void outliner_draw_tree_element_floating( unsigned int pos = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 2, KEEP_FLOAT); int coord_y = te_insert->ys; + int coord_x = te_insert->xs; unsigned char col[4]; if (te_insert == te_floating) { @@ -1547,7 +1548,7 @@ static void outliner_draw_tree_element_floating( glLineWidth(line_width); immBegin(PRIM_LINE_STRIP, 2); - immVertex2f(pos, 0, coord_y); + immVertex2f(pos, coord_x, coord_y); immVertex2f(pos, ar->v2d.cur.xmax, coord_y); immEnd(); } @@ -1556,8 +1557,8 @@ static void outliner_draw_tree_element_floating( immUniformColor4ub(UNPACK3(col), col[3] * 0.5f); immBegin(PRIM_QUADS, 4); - immVertex2f(pos, 0, coord_y); - immVertex2f(pos, 0, coord_y + UI_UNIT_Y); + immVertex2f(pos, coord_x, coord_y); + immVertex2f(pos, coord_x, coord_y + UI_UNIT_Y); immVertex2f(pos, ar->v2d.cur.xmax, coord_y + UI_UNIT_Y); immVertex2f(pos, ar->v2d.cur.xmax, coord_y); immEnd(); |