Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2019-09-06 17:44:50 +0300
committerHarley Acheson <harley.acheson@gmail.com>2019-09-06 17:44:50 +0300
commit24d05b5ff9d6d85a7ff8f58b47bef31b5dbcec81 (patch)
tree58c82ea4c18b14097fa280b1add57a2a3c364985 /source/blender/editors/space_file/file_draw.c
parent61cc604da70550cdda0e20ef26e4e563eb22421a (diff)
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
Diffstat (limited to 'source/blender/editors/space_file/file_draw.c')
-rw-r--r--source/blender/editors/space_file/file_draw.c20
1 files changed, 10 insertions, 10 deletions
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);
}