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-12-07 00:10:30 +0300
committerHarley Acheson <harley.acheson@gmail.com>2019-12-07 00:10:30 +0300
commit7c2217cd126a97df9b1c305f79a605f25c06a229 (patch)
tree4033f2c2e3ecc35bd82c610e408762dac722afe0 /release
parenta05b79e96d79757d5ad3fca95a766f4134b9368e (diff)
UI: File Browser Volumes and System Lists Icons
Allows each File Browser list item in Volumes and System to use individual icons. Differential Revision: https://developer.blender.org/D5802 Reviewed by Julian Eisel
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_filebrowser.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index 958052c8f25..543a45e85c2 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -165,24 +165,15 @@ class FILEBROWSER_UL_dir(UIList):
def draw_item(self, _context, layout, _data, item, icon, _active_data, active_propname, _index):
direntry = item
# space = context.space_data
- icon = 'NONE'
- if active_propname == "system_folders_active":
- icon = 'DISK_DRIVE'
- if active_propname == "system_bookmarks_active":
- icon = 'BOOKMARKS'
- if active_propname == "bookmarks_active":
- icon = 'BOOKMARKS'
- if active_propname == "recent_folders_active":
- icon = 'FILE_FOLDER'
if self.layout_type in {'DEFAULT', 'COMPACT'}:
row = layout.row(align=True)
row.enabled = direntry.is_valid
# Non-editable entries would show grayed-out, which is bad in this specific case, so switch to mere label.
if direntry.is_property_readonly("name"):
- row.label(text=direntry.name, icon=icon)
+ row.label(text=direntry.name, icon_value=icon)
else:
- row.prop(direntry, "name", text="", emboss=False, icon=icon)
+ row.prop(direntry, "name", text="", emboss=False, icon_value=icon)
elif self.layout_type == 'GRID':
layout.alignment = 'CENTER'