RNA: UILayout.split(..) 'percentage' to 'factor'

Misleading name since it's between 0..1.

Use as a keyword argument to prepare for keyword only args.

Also document that leaving unset has special behavior.
This commit is contained in:
2018-08-28 12:38:54 +10:00
parent e9fb2feb2e
commit d3a72033f6
21 changed files with 132 additions and 129 deletions

View File

@@ -92,7 +92,7 @@ class MESH_UL_shape_keys(UIList):
# key = data
key_block = item
if self.layout_type in {'DEFAULT', 'COMPACT'}:
split = layout.split(0.66, False)
split = layout.split(factor=0.66, align=False)
split.prop(key_block, "name", text="", emboss=False, icon_value=icon)
row = split.row(align=True)
if key_block.mute or (obj.mode == 'EDIT' and not (obj.use_shape_key_edit_mode and obj.type == 'MESH')):
@@ -326,7 +326,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
sub.operator("object.shape_key_move", icon='TRIA_UP', text="").type = 'UP'
sub.operator("object.shape_key_move", icon='TRIA_DOWN', text="").type = 'DOWN'
split = layout.split(percentage=0.4)
split = layout.split(factor=0.4)
row = split.row()
row.enabled = enable_edit
row.prop(key, "use_relative")