diff options
author | Harley Acheson <harley> | 2019-05-01 18:38:33 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-01 19:05:48 +0300 |
commit | f597cb6d03b0e9202d3b22b0b84b43ed7c06be1c (patch) | |
tree | 7f56f57d8f38f3858da05d0f7e3992ed838fb130 | |
parent | 374728293274530d324a8eee53e3cfcce13f7884 (diff) |
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
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 12 |
1 files changed, 6 insertions, 6 deletions
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); } } } |