Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-09-11 04:08:07 +0400
committerMatt Ebb <matt@mke3.net>2010-09-11 04:08:07 +0400
commit0df7cde29a3105ccf2a5018517eb9241818299bf (patch)
tree3f8c21109bf4d1761372e9028330a55ff8b9ed12 /source
parentcd4fb20b73edac8ecc5c05240acb49003e216d61 (diff)
Fix for own stupid bug the other day, messed up the gradients in selected/deselected UI elements.
Didn't know beta was going to be today, really hope this makes it in!
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_widgets.c16
1 files changed, 15 insertions, 1 deletions
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 */