diff options
author | Julian Eisel <julian@blender.org> | 2021-10-22 13:33:28 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-10-23 00:53:11 +0300 |
commit | ca5d84b31d16c2e69847ffee16f8d5b092623490 (patch) | |
tree | fa48c47faec37750df5e01a28e98b06539c19fd4 /release | |
parent | 3e1fd2682807c31b62168737c953a6b4ea33ce77 (diff) |
UI: Show ID filter settings in Link/Append File Browser as icon & checkbox
The checkboxes integrate better with the surrounding layout and are not that
attention grabbing. To my knowledge the only reason not to use checkboxes was
so the icons could be displayed. But this does it just like the Outliner filter
settings: Show the icon before the checkbox.
Also widen the popover a bit to fit longer labels (didn't fit before this patch
even).
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_filebrowser.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 641812694c8..420481eec13 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -127,7 +127,7 @@ class FILEBROWSER_PT_display(FileBrowserPanel, Panel): class FILEBROWSER_PT_filter(FileBrowserPanel, Panel): bl_region_type = 'HEADER' bl_label = "Filter Settings" # Shows as tooltip in popover - bl_ui_units_x = 8 + bl_ui_units_x = 10 def draw(self, context): layout = self.layout @@ -195,7 +195,9 @@ class FILEBROWSER_PT_filter(FileBrowserPanel, Panel): filter_id = params.filter_id for identifier in dir(filter_id): if identifier.startswith("category_"): - sub.prop(filter_id, identifier, toggle=True) + subrow = sub.row() + subrow.label(icon=filter_id.bl_rna.properties[identifier].icon) + subrow.prop(filter_id, identifier, toggle=False) col.separator() @@ -388,7 +390,9 @@ class FILEBROWSER_PT_advanced_filter(Panel): filter_id = params.filter_id for identifier in dir(filter_id): if identifier.startswith("filter_"): - col.prop(filter_id, identifier, toggle=True) + row = col.row() + row.label(icon=filter_id.bl_rna.properties[identifier].icon) + row.prop(filter_id, identifier, toggle=False) def is_option_region_visible(context, space): |