[Bf-blender-cvs] [f597cb6d03b] master: UI: remove outliner highlight selection gap
Harley Acheson
noreply at git.blender.org
Wed May 1 18:13:22 CEST 2019
Commit: f597cb6d03b0e9202d3b22b0b84b43ed7c06be1c
Author: Harley Acheson
Date: Wed May 1 17:38:33 2019 +0200
Branches: master
https://developer.blender.org/rBf597cb6d03b0e9202d3b22b0b84b43ed7c06be1c
UI: remove outliner highlight selection gap
When rows were highlighted - for selection, hover, or search - the highlighted
bar would not take up the entire vertical space but instead leave a gap.
That gap generally looks like a separator between items, adding complexity and
fuzziness for no real benefit.
Differential Revision: https://developer.blender.org/D4742
===================================================================
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 d5762fc9dde..8fd3f809001 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -2519,7 +2519,7 @@ static void outliner_draw_highlights_recursive(unsigned pos,
/* selection status */
if (tselem->flag & TSE_SELECTED) {
immUniformColor4fv(col_selection);
- immRecti(pos, 0, start_y + 1, (int)ar->v2d.cur.xmax, start_y + UI_UNIT_Y - 1);
+ immRecti(pos, 0, start_y, (int)ar->v2d.cur.xmax, start_y + UI_UNIT_Y);
}
/* highlights */
@@ -2533,15 +2533,15 @@ static void outliner_draw_highlights_recursive(unsigned pos,
if (tselem->flag & TSE_DRAG_BEFORE) {
immUniformColor4fv(col);
- immRecti(pos, start_x, start_y + UI_UNIT_Y - 1, end_x, start_y + UI_UNIT_Y + 1);
+ immRecti(pos, start_x, start_y + UI_UNIT_Y, end_x, start_y + UI_UNIT_Y);
}
else if (tselem->flag & TSE_DRAG_AFTER) {
immUniformColor4fv(col);
- immRecti(pos, start_x, start_y - 1, end_x, start_y + 1);
+ immRecti(pos, start_x, start_y, end_x, start_y);
}
else {
immUniformColor3fvAlpha(col, col[3] * 0.5f);
- immRecti(pos, start_x, start_y + 1, end_x, start_y + UI_UNIT_Y - 1);
+ immRecti(pos, start_x, start_y, end_x, start_y + UI_UNIT_Y);
}
}
else {
@@ -2550,12 +2550,12 @@ static void outliner_draw_highlights_recursive(unsigned pos,
* we don't expand items when searching in the datablocks but we
* still want to highlight any filter matches. */
immUniformColor4fv(col_searchmatch);
- immRecti(pos, start_x, start_y + 1, end_x, start_y + UI_UNIT_Y - 1);
+ immRecti(pos, start_x, start_y, end_x, start_y + UI_UNIT_Y);
}
else if (tselem->flag & TSE_HIGHLIGHTED) {
/* mouse hover highlight */
immUniformColor4fv(col_highlight);
- immRecti(pos, 0, start_y + 1, end_x, start_y + UI_UNIT_Y - 1);
+ immRecti(pos, 0, start_y, end_x, start_y + UI_UNIT_Y);
}
}
}
More information about the Bf-blender-cvs
mailing list