[Bf-blender-cvs] [000009f4d6f] userpref_redesign: Use full region width for file path panels

Severin noreply at git.blender.org
Fri Jan 4 21:44:00 CET 2019


Commit: 000009f4d6f96c478242aede30f3e3c8bc386a25
Author: Severin
Date:   Fri Jan 4 21:40:16 2019 +0100
Branches: userpref_redesign
https://developer.blender.org/rB000009f4d6f96c478242aede30f3e3c8bc386a25

Use full region width for file path panels

The horizontal margin would shrink the text button, reducing space to
show file paths in. For file paths, larger buttons make sense though, so
remove the margin.

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

M	release/scripts/startup/bl_ui/space_userpref.py

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

diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 312c2dcb9a2..a115213fc2a 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1125,7 +1125,9 @@ class ThemeGenericClassGenerator():
                 theme_area, theme_area.identifier.lower())
 
 
-class USERPREF_PT_file_paths(PreferencePanel):
+class USERPREF_PT_file_paths(Panel):
+    bl_space_type = 'PREFERENCES'
+    bl_region_type = 'WINDOW'
     bl_label = "File Paths"
 
     @classmethod
@@ -1133,11 +1135,15 @@ class USERPREF_PT_file_paths(PreferencePanel):
         prefs = context.preferences
         return (prefs.active_section == 'SYSTEM_FILES')
 
-    def draw_props(self, context, layout):
+    def draw(self, context):
+        layout = self.layout
         prefs = context.preferences
         paths = prefs.filepaths
         system = prefs.system
 
+        layout.use_property_split = True
+        layout.use_property_decorate = False  # No animation.
+
         layout.prop(paths, "render_output_directory", text="Render Output")
         layout.prop(paths, "render_cache_directory", text="Render Cache")
         layout.prop(paths, "font_directory", text="Fonts")
@@ -1154,7 +1160,9 @@ class USERPREF_PT_file_paths(PreferencePanel):
         row.prop(paths, "animation_player", text="Animation Player")
 
 
-class USERPREF_PT_file_autorun(PreferencePanel):
+class USERPREF_PT_file_autorun(Panel):
+    bl_space_type = 'PREFERENCES'
+    bl_region_type = 'WINDOW'
     bl_label = "Auto Run Python Scripts"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -1169,10 +1177,14 @@ class USERPREF_PT_file_autorun(PreferencePanel):
 
         self.layout.prop(paths, "use_scripts_auto_execute", text="")
 
-    def draw_props(self, context, layout):
+    def draw(self, context):
+        layout = self.layout
         prefs = context.preferences
         paths = prefs.filepaths
 
+        layout.use_property_split = True
+        layout.use_property_decorate = False  # No animation.
+
         layout.active = paths.use_scripts_auto_execute
 
         box = layout.box()



More information about the Bf-blender-cvs mailing list