[Bf-blender-cvs] [3d536f69f69] master: UI: Use property split for custom property edit popover

Hans Goudey noreply at git.blender.org
Sat Jul 18 01:54:33 CEST 2020


Commit: 3d536f69f6914882117bd0905f42a7be442975d2
Author: Hans Goudey
Date:   Fri Jul 17 19:54:11 2020 -0400
Branches: master
https://developer.blender.org/rB3d536f69f6914882117bd0905f42a7be442975d2

UI: Use property split for custom property edit popover

The panel looks out of place with the rest of Blender's UI and the
text is cropped. With property split turned on and a few smaller
tweaks these issues are fixed.

|  Before  |  After   |
|{F8700181}|{F8700183}|

Differential Revision: https://developer.blender.org/D8322

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

M	release/scripts/startup/bl_operators/wm.py

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

diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index fc11e4a0a87..570b4663f1d 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1450,6 +1450,10 @@ class WM_OT_properties_edit(Operator):
         )
 
         layout = self.layout
+
+        layout.use_property_split = True
+        layout.use_property_decorate = False
+
         layout.prop(self, "property")
         layout.prop(self, "value")
 
@@ -1460,18 +1464,18 @@ class WM_OT_properties_edit(Operator):
         row.enabled = proptype in {int, float, str}
         row.prop(self, "default")
 
-        row = layout.row(align=True)
-        row.prop(self, "min")
-        row.prop(self, "max")
+        col = layout.column(align=True)
+        col.prop(self, "min")
+        col.prop(self, "max")
 
-        row = layout.row()
-        row.prop(self, "use_soft_limits")
-        row.prop(self, "is_overridable_library")
+        col = layout.column()
+        col.prop(self, "is_overridable_library")
+        col.prop(self, "use_soft_limits")
 
-        row = layout.row(align=True)
-        row.enabled = self.use_soft_limits
-        row.prop(self, "soft_min", text="Soft Min")
-        row.prop(self, "soft_max", text="Soft Max")
+        col = layout.column(align=True)
+        col.enabled = self.use_soft_limits
+        col.prop(self, "soft_min", text="Soft Min")
+        col.prop(self, "soft_max", text="Max")
         layout.prop(self, "description")
 
         if is_array and proptype == float:



More information about the Bf-blender-cvs mailing list