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
This commit is contained in:
@@ -2519,7 +2519,7 @@ static void outliner_draw_highlights_recursive(unsigned pos,
|
|||||||
/* selection status */
|
/* selection status */
|
||||||
if (tselem->flag & TSE_SELECTED) {
|
if (tselem->flag & TSE_SELECTED) {
|
||||||
immUniformColor4fv(col_selection);
|
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 */
|
/* highlights */
|
||||||
@@ -2533,15 +2533,15 @@ static void outliner_draw_highlights_recursive(unsigned pos,
|
|||||||
|
|
||||||
if (tselem->flag & TSE_DRAG_BEFORE) {
|
if (tselem->flag & TSE_DRAG_BEFORE) {
|
||||||
immUniformColor4fv(col);
|
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) {
|
else if (tselem->flag & TSE_DRAG_AFTER) {
|
||||||
immUniformColor4fv(col);
|
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 {
|
else {
|
||||||
immUniformColor3fvAlpha(col, col[3] * 0.5f);
|
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 {
|
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
|
* we don't expand items when searching in the datablocks but we
|
||||||
* still want to highlight any filter matches. */
|
* still want to highlight any filter matches. */
|
||||||
immUniformColor4fv(col_searchmatch);
|
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) {
|
else if (tselem->flag & TSE_HIGHLIGHTED) {
|
||||||
/* mouse hover highlight */
|
/* mouse hover highlight */
|
||||||
immUniformColor4fv(col_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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user