diff options
author | Matt Ebb <matt@mke3.net> | 2010-01-13 05:01:34 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-01-13 05:01:34 +0300 |
commit | 0edecb73cf2928108c42bf1ae667a1ce7a3f0b96 (patch) | |
tree | 06f5dd6c2f4b5281eaa41431e5c8275c7642a6bf /source | |
parent | 8e076e0341797cac449895f4ab57e0c0c94cc74f (diff) |
Fix [#20655] wrong button shading
Also restored copy/paste for color swatches
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 6 |
3 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 5c91a91e447..7a1cc4f5bad 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -812,7 +812,7 @@ static void ui_is_but_sel(uiBut *but) if(value == but->hardmax) push= 1; break; case COL: - push= 1; + push= 2; break; default: push= 2; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 7c0fa1fbc74..705decec70d 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -948,7 +948,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, else { if (sscanf(buf, "[%f, %f, %f]", &rgb[0], &rgb[1], &rgb[2]) == 3) { button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); - VECCOPY(data->vec, rgb); + ui_set_but_vectorf(but, rgb); button_activate_state(C, but, BUTTON_STATE_EXIT); } } diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 6c78a1f2a11..7b975d17184 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -1330,10 +1330,8 @@ static void widget_state(uiWidgetType *wt, int state) VECCOPY(wt->wcol.text, wt->wcol.text_sel); - /* only flip shade if it's not "pushed in" already */ - if(wt->wcol.shaded && wt->wcol.shadetop>wt->wcol.shadedown) { - SWAP(short, wt->wcol.shadetop, wt->wcol.shadedown); - } + /* swap for selection - show depressed */ + SWAP(short, wt->wcol.shadetop, wt->wcol.shadedown); } else { if(state & UI_BUT_ANIMATED_KEY) |