diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2018-03-23 22:32:58 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2018-03-23 22:46:51 +0300 |
commit | 357b72e0a7d4a270bf1273102595446ccca16259 (patch) | |
tree | 68402524659a1eccf346602f79f3da5e5a94973e /source/blender/editors | |
parent | a7e4268beeda8e49cd93af375b125c72e6f2ac93 (diff) |
Theming: Use list-item colors for all un-embossed buttons in list-items
E.g. number buttons in the shape key list would use theme colors of text
widgets.
Addresses T50862.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 5 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 47de598c028..bf39a8d353f 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -7713,7 +7713,10 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s /* highlight has timers for tooltips and auto open */ if (state == BUTTON_STATE_HIGHLIGHT) { - but->flag &= ~UI_SELECT; + /* for list-items (that are not drawn with regular emboss), don't change selection based on hovering */ + if (((but->flag & UI_BUT_LIST_ITEM) == 0) && (but->dragflag & UI_EMBOSS_NONE)) { + but->flag &= ~UI_SELECT; + } button_tooltip_timer_reset(C, but); diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 21dac015f82..ff752ddddba 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1486,7 +1486,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index } /* Mark non-embossed textfields inside a listbox. */ - if (but && (block->flag & UI_BLOCK_LIST_ITEM) && (but->type == UI_BTYPE_TEXT) && (but->dt & UI_EMBOSS_NONE)) { + if (but && (block->flag & UI_BLOCK_LIST_ITEM) && (but->dt & UI_EMBOSS_NONE)) { UI_but_flag_enable(but, UI_BUT_LIST_ITEM); } |