diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-10-15 01:40:33 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-10-15 02:03:25 +0300 |
commit | ae8e84547005dcb67ed85a6c65a1e0f031758dbf (patch) | |
tree | b2e98ceece1723979e91d1e27ed85332a8196f82 /source/blender/editors/space_outliner/outliner_ops.c | |
parent | ee54a6f130765341bb4a235e09509d271f219a73 (diff) |
Outliner: Element mouse hover feedback
Some little UI polish to get familiar with outliner code (but also because it's a useful feature). Committing to blender2.8 branch but can also port to master (2.7) if wanted.
This basically causes the mouse hovered element to be highlighted. Contrast of the highlight should be fine, even with a non-default theme. Also did some minor cleanup.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_ops.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_ops.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index 776717c8443..f0c2d848f7a 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -43,6 +43,7 @@ void outliner_operatortypes(void) { + WM_operatortype_append(OUTLINER_OT_highlight_update); WM_operatortype_append(OUTLINER_OT_item_activate); WM_operatortype_append(OUTLINER_OT_select_border); WM_operatortype_append(OUTLINER_OT_item_openclose); @@ -93,7 +94,9 @@ void outliner_keymap(wmKeyConfig *keyconf) { wmKeyMap *keymap = WM_keymap_find(keyconf, "Outliner", SPACE_OUTLINER, 0); wmKeyMapItem *kmi; - + + WM_keymap_add_item(keymap, "OUTLINER_OT_highlight_update", MOUSEMOVE, KM_ANY, KM_ANY, 0); + WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_DBL_CLICK, 0, 0); kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, 0, 0); |