[Bf-blender-cvs] [ee0d8426ab6] master: UI: Dynamic region size for file browser options

Julian Eisel noreply at git.blender.org
Fri May 3 23:17:02 CEST 2019


Commit: ee0d8426ab6d301c0296496c25f9511b9a9768e9
Author: Julian Eisel
Date:   Fri May 3 23:09:47 2019 +0200
Branches: master
https://developer.blender.org/rBee0d8426ab6d301c0296496c25f9511b9a9768e9

UI: Dynamic region size for file browser options

Makes the file browser operator property region (lower left) dynamically
sized to content. Previously, the default size would work really badly
for file browsers opened in small windows, e.g. to install Add-ons from
the preferences window. It would be mostly empty but use lots of space
then.

===================================================================

M	source/blender/editors/space_file/space_file.c

===================================================================

diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 9fb07042104..4629f33d210 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -83,6 +83,7 @@ static SpaceLink *file_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
   BLI_addtail(&sfile->regionbase, ar);
   ar->regiontype = RGN_TYPE_TOOL_PROPS;
   ar->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
+  ar->flag |= RGN_FLAG_DYNAMIC_SIZE;
 
   /* ui list region */
   ar = MEM_callocN(sizeof(ARegion), "ui region for file");



More information about the Bf-blender-cvs mailing list