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/anim_channels_defines.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/anim_channels_defines.c')
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 1495ca50870..b80667a011a 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -223,8 +223,8 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa } else { // FIXME: what happens when the indention is 1 greater than what it should be (due to grouping)? - int colOfs = 20 - 20 * indent; - UI_GetThemeColorShade3fv(TH_DOPESHEET_CHANNELSUBOB, colOfs, r_color); + int colOfs = 10 - 10 * indent; + UI_GetThemeColorShade3fv(TH_SHADE2, colOfs, r_color); } } @@ -817,9 +817,9 @@ static void acf_group_color(bAnimContext *ac, bAnimListElem *ale, float r_color[ else { /* highlight only for active */ if (ale->flag & AGRP_ACTIVE) - UI_GetThemeColorShade3fv(TH_GROUP_ACTIVE, 10, r_color); + UI_GetThemeColor3fv(TH_GROUP_ACTIVE, r_color); else - UI_GetThemeColorShade3fv(TH_GROUP, 20, r_color); + UI_GetThemeColor3fv(TH_GROUP, r_color); } } |