diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2020-11-27 00:19:05 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2020-12-02 18:58:32 +0300 |
commit | 3fc178b19e4c11ac384731c4088b2bd3fa809794 (patch) | |
tree | e35687ef554f8c1ae6addb61a20dba07766a7c22 /source/blender/editors/space_outliner/outliner_draw.c | |
parent | 3d0c5455edf4e32e6e8120b280710cb4b531e38a (diff) |
Outliner: Highlight icons on cursor hover
The icons for collapsed children already draw highlighted when hovered.
Because the item icons are now select targets (for outliner to properties
editor tab switching) this adds highlights on hover for all outliner
element icons.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_draw.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index ea2e3ce2565..6364fbc0a87 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -2782,7 +2782,7 @@ static void outliner_draw_iconrow_doit(uiBlock *block, icon_border); } - if (tselem->flag & TSE_HIGHLIGHTED) { + if (tselem->flag & TSE_HIGHLIGHTED_ICON) { alpha_fac += 0.5; } tselem_draw_icon(block, xmax, (float)*offsx, (float)ys, tselem, te, alpha_fac, false); @@ -3078,8 +3078,14 @@ static void outliner_draw_tree_element(bContext *C, /* datatype icon */ if (!(ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM, TSE_ID_BASE))) { - tselem_draw_icon( - block, xmax, (float)startx + offsx, (float)*starty, tselem, te, alpha_fac, true); + tselem_draw_icon(block, + xmax, + (float)startx + offsx, + (float)*starty, + tselem, + te, + (tselem->flag & TSE_HIGHLIGHTED_ICON) ? alpha_fac + 0.5f : alpha_fac, + true); offsx += UI_UNIT_X + 4 * ufac; } else { |