diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-04-15 17:31:46 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-04-15 17:31:46 +0300 |
commit | ebc94798de48fffca9420462609058db65ea8fec (patch) | |
tree | bc3a229d7a358c982f9da8db7c67296a0e3f3639 /source/blender/editors/animation | |
parent | 62eec5ab8e92e462336272d7f451e263481193f3 (diff) |
Make icon use a dim version instead for modifier muting
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index f27430ceee1..10af5b84509 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -867,6 +867,7 @@ static int acf_group_setting_flag(bAnimContext *ac, eAnimChannel_Settings settin return AGRP_MUTED; case ACHANNEL_SETTING_MOD_OFF: /* muted */ + *neg = 1; return AGRP_MODIFIERS_OFF; case ACHANNEL_SETTING_PROTECT: /* protected */ @@ -987,6 +988,7 @@ static int acf_fcurve_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin return FCURVE_VISIBLE; case ACHANNEL_SETTING_MOD_OFF: + *neg = 1; return FCURVE_MOD_OFF; default: /* unsupported */ @@ -3983,6 +3985,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni { short ptrsize, butType; bool negflag; + bool usetoggle = true; int flag, icon; void *ptr; const char *tooltip; @@ -4007,7 +4010,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni case ACHANNEL_SETTING_MOD_OFF: /* modifiers disabled */ icon = ICON_MODIFIER; - + usetoggle = false; tooltip = TIP_("F-Curve modifiers are disabled"); break; @@ -4071,11 +4074,18 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni } /* type of button */ - if (negflag) - butType = UI_BTYPE_ICON_TOGGLE_N; - else - butType = UI_BTYPE_ICON_TOGGLE; - + if (usetoggle) { + if (negflag) + butType = UI_BTYPE_ICON_TOGGLE_N; + else + butType = UI_BTYPE_ICON_TOGGLE; + } + else { + if (negflag) + butType = UI_BTYPE_TOGGLE_N; + else + butType = UI_BTYPE_TOGGLE; + } /* draw button for setting */ if (ptr && flag) { switch (ptrsize) { |