[Bf-blender-cvs] [989632417bf] blender2.8: Draw drag&drop feedback overlays with element indentation
Julian Eisel
noreply at git.blender.org
Fri Mar 10 15:59:54 CET 2017
Commit: 989632417bfaa08aac61258c55b00eee4a8a5929
Author: Julian Eisel
Date: Fri Mar 10 15:58:08 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB989632417bfaa08aac61258c55b00eee4a8a5929
Draw drag&drop feedback overlays with element indentation
That way users can see better at which hierarchy level the element will
be inserted into.
===================================================================
M source/blender/editors/space_outliner/outliner_draw.c
===================================================================
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();
More information about the Bf-blender-cvs
mailing list