UI: Remove empty space in Custom Properties panel

Remove empty space in Custom Properties panel, and align buttons in a row.

Pull Request: https://projects.blender.org/blender/blender/pulls/115913
This commit is contained in:
Nika Kutsniashvili 2024-02-05 14:34:14 +01:00 committed by Pablo Vazquez
parent ecbf3385c5
commit 2274f58ef2
1 changed files with 1 additions and 4 deletions

View File

@ -221,7 +221,7 @@ def draw(layout, context, context_member, property_type, *, use_edit=True):
else:
value_column.prop(rna_item, rna_idprop_quote_path(key), text="")
operator_row = value_row.row()
operator_row = value_row.row(align=True)
operator_row.alignment = 'RIGHT'
# Do not allow editing of overridden properties (we cannot use a poll function
@ -241,9 +241,6 @@ def draw(layout, context, context_member, property_type, *, use_edit=True):
props = operator_row.operator("wm.properties_remove", text="", icon='X', emboss=False)
props.data_path = context_member
props.property_name = key
else:
# Add some spacing, so the right side of the buttons line up with layouts with decorators.
operator_row.label(text="", icon='BLANK1')
class PropertyPanel: