diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 8e49cb4f514..c5f0913e35d 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -1419,6 +1419,9 @@ static void widget_state(uiWidgetType *wt, int state) widget_state_blend(wt->wcol.inner, wcol_state->inner_driven_sel, wcol_state->blend); VECCOPY(wt->wcol.text, wt->wcol.text_sel); + + if(state & UI_SELECT) + SWAP(short, wt->wcol.shadetop, wt->wcol.shadedown); } else { if(state & UI_BUT_ANIMATED_KEY) @@ -1455,6 +1458,9 @@ static void widget_state_numslider(uiWidgetType *wt, int state) widget_state_blend(wt->wcol.item, wcol_state->inner_anim_sel, blend); else if(state & UI_BUT_DRIVEN) widget_state_blend(wt->wcol.item, wcol_state->inner_driven_sel, blend); + + if(state & UI_SELECT) + SWAP(short, wt->wcol.shadetop, wt->wcol.shadedown); } else { if(state & UI_BUT_ANIMATED_KEY) @@ -1951,6 +1957,9 @@ static void widget_numbut(uiWidgetColors *wcol, rcti *rect, int state, int round float rad= 0.5f*(rect->ymax - rect->ymin); float textofs = rad*0.75; + if(state & UI_SELECT) + SWAP(short, wcol->shadetop, wcol->shadedown); + widget_init(&wtb); /* fully rounded */ @@ -2250,7 +2259,9 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s widgetbase_draw(&wtb1, wcol); VECCOPY(wcol->outline, outline); - SWAP(short, wcol->shadetop, wcol->shadedown); + + if(!(state & UI_SELECT)) + SWAP(short, wcol->shadetop, wcol->shadedown); /* outline */ wtb.outline= 1; @@ -2305,6 +2316,9 @@ static void widget_textbut(uiWidgetColors *wcol, rcti *rect, int state, int roun { uiWidgetBase wtb; + if(state & UI_SELECT) + SWAP(short, wcol->shadetop, wcol->shadedown); + widget_init(&wtb); /* half rounded */