Cleanup: avoid unnecessary separator

The extensions UI was aligning all buttons then adding a separator.
Simplify the layout by removing align which removes the need for an
explicit separator.
This commit is contained in:
Campbell Barton 2024-06-27 21:35:23 +10:00
parent 42e1239ba8
commit c3d18854f3

@ -1158,11 +1158,11 @@ def extension_draw_item(
# Add a top-level row so `row_right` can have a grayed out button/label
# without graying out the menu item since# that is functional.
row_right_toplevel = row.row(align=True)
row_right_toplevel = row.row()
if operation_in_progress:
row_right_toplevel.enabled = False
row_right_toplevel.alignment = 'RIGHT'
row_right = row_right_toplevel.row(align=True)
row_right = row_right_toplevel.row()
row_right.alignment = 'RIGHT'
if has_remote and (item_remote is not None):
@ -1186,10 +1186,11 @@ def extension_draw_item(
row_right.active = False
row_right = row_right_toplevel.row(align=True)
row_right = row_right_toplevel.row()
row_right.alignment = 'RIGHT'
row_right.separator()
# NOTE: keep space between any buttons and this menu to prevent stray clicks accidentally running install.
# Currently there is enough space by default without an explicit separator.
# Used `extension_path` so the menu can access "this" extension.
row_right.context_string_set("extension_path", "{:s}.{:s}".format(repo_item.module, pkg_id))
row_right.menu("USERPREF_MT_extensions_item", text="", icon='DOWNARROW_HLT')