diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-09 18:37:26 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-09 20:55:10 +0300 |
commit | 60ca2fe3385d4c8b51d54ca05012d5741b5c1c79 (patch) | |
tree | 582b5aef2ab3c4aded754969a60b6390d1406b13 /source/blender/editors/interface/resources.c | |
parent | 6148ed8cf9cadbd913667c2f80e9e44f584c0f1c (diff) |
UI: dim icons in inactive tabs, similar to text
This makes the properties editor navigation bar less saturated. Internally
the icon theme coloring was refactored a bit to move more towards the button
drawing code.
Diffstat (limited to 'source/blender/editors/interface/resources.c')
-rw-r--r-- | source/blender/editors/interface/resources.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 86806946db0..14fad2f3072 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -1357,7 +1357,7 @@ void UI_GetThemeColorType4ubv(int colorid, int spacetype, uchar col[4]) col[3] = cp[3]; } -bool UI_GetIconThemeColor4fv(int colorid, float col[4]) +bool UI_GetIconThemeColor4ubv(int colorid, uchar col[4]) { if (colorid == 0) { return false; @@ -1371,12 +1371,11 @@ bool UI_GetIconThemeColor4fv(int colorid, float col[4]) return false; } - const uchar *cp; - cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); - col[0] = ((float)cp[0]) / 255.0f; - col[1] = ((float)cp[1]) / 255.0f; - col[2] = ((float)cp[2]) / 255.0f; - col[3] = ((float)cp[3]) / 255.0f; + const uchar *cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); + col[0] = cp[0]; + col[1] = cp[1]; + col[2] = cp[2]; + col[3] = cp[3]; return true; } |