From 9dbe3bbe469e14ce9b71894b6c561d7549adb286 Mon Sep 17 00:00:00 2001 From: Torrin Leonard <82110564+torrinworx@users.noreply.github.com> Date: Thu, 11 Aug 2022 12:01:56 -0400 Subject: [PATCH] Fixing Logic UI Layout --- UILists/Logic_UIList.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/UILists/Logic_UIList.py b/UILists/Logic_UIList.py index 8bed03f..0f82f42 100644 --- a/UILists/Logic_UIList.py +++ b/UILists/Logic_UIList.py @@ -58,7 +58,7 @@ class CUSTOM_OT_logic_actions(Operator): if self.action == 'ADD': if context.object: item = scn.logic_fields.add() - item.name = "Rule" # The name of each object + item.name = "Rule" scn.logic_fields_index = len(scn.logic_fields) - 1 info = '"%s" added to list' % (item.name) self.report({'INFO'}, info) @@ -93,14 +93,16 @@ class CUSTOM_OT_logic_clearList(Operator): # ======== UILists ======== # class CUSTOM_UL_logic_items(UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): - split = layout.split(factor=0.1) - split.label(text=f"{index + 1}") - row = split.row() - row.label(text=item.name) # avoids renaming the item by accident - row.prop(item, "item_list1", text="") + layout = layout.split(factor=0.1) + col = layout.column() + col.label(text=f" Rule {index + 1}") - row.prop(item, "rule_type", text="") - row.prop(item, "item_list2", text="") + col = layout.column() + col.label(text="") + col.prop(item, "item_list1", text="") + + col.prop(item, "rule_type", text="") + col.prop(item, "item_list2", text="") def invoke(self, context, event): pass