diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-10-18 23:48:06 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-10-19 18:30:24 +0300 |
commit | eaa527f6949e7eff77a3b5ecfa8897df126a7771 (patch) | |
tree | 4b0e1c10028abc1de41af84aaf4e82a7232b7f73 /source/blender/editors/animation/keyframes_draw.c | |
parent | 891078b3bc5b675c47159fe8e5171d5bb7d86713 (diff) |
Dope Sheet: remove many hard-coded color and alpha constants.
Add the necessary colors and/or alpha components to the theme instead.
Also switch the background for ordinary channels to use the likely
intended theme option, instead of the window background color.
The general rule is that the channel color is drawn full strength in the
channel list on the left, and with alpha in the actual key frame area on
the right. This alpha is also reused with bone group colors.
Reviewers: brecht, billreynish
Differential Revision: https://developer.blender.org/D3813
Diffstat (limited to 'source/blender/editors/animation/keyframes_draw.c')
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 046bf2a3106..33e2a11f4c5 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -471,10 +471,7 @@ void draw_keyframe_shape(float x, float y, float size, bool sel, short key_type, UI_GetThemeColor4ubv(sel ? TH_KEYTYPE_JITTER_SELECT : TH_KEYTYPE_JITTER, fill_col); break; case BEZT_KEYTYPE_MOVEHOLD: /* similar to traditional keyframes, but different... */ - /* XXX: Should these get their own theme options instead? */ - if (sel) UI_GetThemeColorShade3ubv(TH_STRIP_SELECT, 35, fill_col); - else UI_GetThemeColorShade3ubv(TH_STRIP, 50, fill_col); - fill_col[3] = 255; /* full opacity, to avoid problems with visual glitches */ + UI_GetThemeColor4ubv(sel ? TH_KEYTYPE_MOVEHOLD_SELECT : TH_KEYTYPE_MOVEHOLD, fill_col); break; case BEZT_KEYTYPE_KEYFRAME: /* traditional yellowish frames (default theme) */ default: |