From 60ca2fe3385d4c8b51d54ca05012d5741b5c1c79 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 9 May 2019 17:37:26 +0200 Subject: 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. --- source/blender/editors/interface/resources.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'source/blender/editors/interface/resources.c') 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; } -- cgit v1.2.3