Commit: 0435e3c6b2653b219e4a54f51fc887ef22d2187e
Author: Julian Eisel
Date:   Sun Jun 7 18:52:01 2015 +0200
Branches: UI-experiments
https://developer.blender.org/rB0435e3c6b2653b219e4a54f51fc887ef22d2187e

Draw emboss for non-embossed buttons on hover for better visual feedback

We could check other approaches for this as well, like changing mouse
cursor, but let's test this one first.

===================================================================

M       source/blender/editors/interface/interface_widgets.c

===================================================================

diff --git a/source/blender/editors/interface/interface_widgets.c 
b/source/blender/editors/interface/interface_widgets.c
index 41a1ac8..31622fc 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -3951,7 +3951,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle 
*style, uiBut *but, rct
                                break;
                }
        }
-       else if (but->dt == UI_EMBOSS_NONE) {
+       else if (but->dt == UI_EMBOSS_NONE && (but->flag & UI_ACTIVE) == 0) {
                /* "nothing" */
                wt = widget_type(UI_WTYPE_ICON);
        }
@@ -3959,7 +3959,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle 
*style, uiBut *but, rct
                wt = widget_type(UI_WTYPE_MENU_ITEM_RADIAL);
        }
        else {
-               BLI_assert(but->dt == UI_EMBOSS);
+               BLI_assert(but->dt == UI_EMBOSS || (but->dt == UI_EMBOSS_NONE 
&& (but->flag & UI_ACTIVE)));
 
                switch (but->type) {
                        case UI_BTYPE_LABEL:

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to