UI: Remove unnecessary empty spaces in Custom Properties panels #115913

Merged
Pablo Vazquez merged 2 commits from nickberckley/blender:custom-properties-panel into main 2024-02-05 14:34:25 +01:00
1 changed files with 1 additions and 4 deletions

View File

@ -212,7 +212,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
@ -232,9 +232,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')
nickberckley marked this conversation as resolved Outdated

You should remove unused code instead of commenting it out.

You should remove unused code instead of commenting it out.

Yeah I wasnt sure about guideline on that so waited for a reply.

Yeah I wasnt sure about guideline on that so waited for a reply.
class PropertyPanel: