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 --- release/datafiles/locale | 2 +- release/datafiles/prvicons.png | Bin 10766 -> 12172 bytes release/datafiles/prvicons.svg | 208 ++++++++++++++++---------- release/datafiles/prvicons_update.py | 2 +- release/scripts/addons | 2 +- release/scripts/addons_contrib | 2 +- source/blender/editors/space_file/file_draw.c | 20 +-- source/blender/editors/space_file/filelist.c | 13 +- source/tools | 2 +- 9 files changed, 151 insertions(+), 100 deletions(-) diff --git a/release/datafiles/locale b/release/datafiles/locale index 6a6b84fd505..e7cd12454a2 160000 --- a/release/datafiles/locale +++ b/release/datafiles/locale @@ -1 +1 @@ -Subproject commit 6a6b84fd50538a65276c729b5d396be615bc79f2 +Subproject commit e7cd12454a2fe775361012cbc176fb9c370b6abb diff --git a/release/datafiles/prvicons.png b/release/datafiles/prvicons.png index dbc0f11124e..7c78507a539 100644 Binary files a/release/datafiles/prvicons.png and b/release/datafiles/prvicons.png differ diff --git a/release/datafiles/prvicons.svg b/release/datafiles/prvicons.svg index 80929124251..6c81c0c16b7 100644 --- a/release/datafiles/prvicons.svg +++ b/release/datafiles/prvicons.svg @@ -10,7 +10,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1536" + width="1792" height="256" id="svg2" sodipodi:version="0.32" @@ -19,7 +19,7 @@ sodipodi:docname="prvicons.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" style="display:inline;enable-background:new" - inkscape:export-filename="prvicons.png" + inkscape:export-filename="D:\blender-2.8-git\blender\release\datafiles\prvicons.png" inkscape:export-xdpi="96" inkscape:export-ydpi="96"> + spacingy="256" + visible="true" /> + enabled="true" /> + enabled="false" + empspacing="4" /> + + @@ -16630,6 +16642,15 @@ offset="1" id="stop39175-18" /> + - - - - + transform="matrix(14.821991,0,0,14.654739,-7251.9905,-1149.2844)"> + transform="matrix(1.4994746,0,0,1.4999989,582.92919,419.89982)"> - - - - - - - - - @@ -17239,5 +17200,94 @@ + + + + + + + + + + + + + + + + + + + diff --git a/release/datafiles/prvicons_update.py b/release/datafiles/prvicons_update.py index f76cf2a9852..85e92e9e564 100755 --- a/release/datafiles/prvicons_update.py +++ b/release/datafiles/prvicons_update.py @@ -17,7 +17,7 @@ if sys.platform == 'darwin': cmd = ( inkscape_path, os.path.join(BASEDIR, "prvicons.svg"), - "--export-width=1536", + "--export-width=1792", "--export-height=256", "--without-gui", "--export-png=" + os.path.join(BASEDIR, "prvicons.png"), diff --git a/release/scripts/addons b/release/scripts/addons index 46b1ada7f5f..c3348263dc2 160000 --- a/release/scripts/addons +++ b/release/scripts/addons @@ -1 +1 @@ -Subproject commit 46b1ada7f5f2d396f712e9a1376922ca89475486 +Subproject commit c3348263dc26d6272db88ed94b73caa3ddb3a3fd diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib index b5e801446c8..7cba50c84cd 160000 --- a/release/scripts/addons_contrib +++ b/release/scripts/addons_contrib @@ -1 +1 @@ -Subproject commit b5e801446c820e7f5725e2e09f8c2a12a4449f45 +Subproject commit 7cba50c84cd415cbdfc900ee2c4e7b3f59d5214c 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); } diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index df783358625..1a7608ba291 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -334,15 +334,16 @@ enum { #define SPECIAL_IMG_SIZE 256 #define SPECIAL_IMG_ROWS 1 -#define SPECIAL_IMG_COLS 6 +#define SPECIAL_IMG_COLS 7 enum { SPECIAL_IMG_DOCUMENT = 0, - SPECIAL_IMG_FOLDER = 1, - SPECIAL_IMG_PARENT = 2, - SPECIAL_IMG_DRIVE_FIXED = 3, - SPECIAL_IMG_DRIVE_ATTACHED = 4, - SPECIAL_IMG_DRIVE_REMOTE = 5, + SPECIAL_IMG_UNSUPORTED = 1, + SPECIAL_IMG_FOLDER = 2, + SPECIAL_IMG_PARENT = 3, + SPECIAL_IMG_DRIVE_FIXED = 4, + SPECIAL_IMG_DRIVE_ATTACHED = 5, + SPECIAL_IMG_DRIVE_REMOTE = 6, SPECIAL_IMG_MAX, }; diff --git a/source/tools b/source/tools index 8598818108d..2550eda6bce 160000 --- a/source/tools +++ b/source/tools @@ -1 +1 @@ -Subproject commit 8598818108ddaf35e30d2a2dbd408ad371e41eb5 +Subproject commit 2550eda6bcefad45289acbb4b8e52107e742ce1f -- cgit v1.2.3