From 24d05b5ff9d6d85a7ff8f58b47bef31b5dbcec81 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 6 Sep 2019 07:44:50 -0700 Subject: UI: File Browser Large Icon Update Replaces the large icons used in the File Browser with updated versions by Andrzej Ambroz (jendrzych). Differential Revision: https://developer.blender.org/D5698 Reviewed by Brecht Van Lommel --- source/blender/editors/space_file/file_draw.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source/blender/editors/space_file/file_draw.c') diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 722cb885614..3e16a8473ad 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -316,18 +316,18 @@ static void file_draw_preview(uiBlock *block, if (is_icon) { const float icon_size = 16.0f / icon_aspect * U.dpi_fac; - float icon_opacity = MIN2(icon_aspect, 0.7); - uchar icon_color[4] = {255, 255, 255, 255}; - float bg[3]; - /* base this off theme color of file or folder later */ - UI_GetThemeColor3fv(TH_BACK, bg); - if (rgb_to_grayscale(bg) > 0.5f) { - icon_color[0] = 0; - icon_color[1] = 0; - icon_color[2] = 0; + float icon_opacity = 0.3f; + uchar icon_color[4] = {0, 0, 0, 255}; + float bgcolor[4]; + UI_GetThemeColor4fv(TH_TEXT, bgcolor); + if (rgb_to_grayscale(bgcolor) < 0.5f) + { + icon_color[0] = 255; + icon_color[1] = 255; + icon_color[2] = 255; } icon_x = xco + (ex / 2.0f) - (icon_size / 2.0f); - icon_y = yco + (ey / 2.0f) - (icon_size * ((typeflags & FILE_TYPE_DIR) ? 0.78f : 0.65f)); + icon_y = yco + (ey / 2.0f) - (icon_size * ((typeflags & FILE_TYPE_DIR) ? 0.78f : 0.75f)); UI_icon_draw_ex( icon_x, icon_y, icon, icon_aspect / U.dpi_fac, icon_opacity, 0.0f, icon_color, false); } -- cgit v1.2.3