From bedd78904d25c56d63c8220870a5fad67530035d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 11 Jan 2016 20:22:14 +1100 Subject: UI: Move checkbox for toggling addons to the LHS Without this, its a little annoying to expand, then enable an addon. This matches panel headers too. --- release/scripts/startup/bl_ui/space_userpref.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index d4a8333c15f..e6302ff7bdc 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1314,9 +1314,19 @@ class USERPREF_PT_addons(Panel): col_box = col.column() box = col_box.box() colsub = box.column() - row = colsub.row() + row = colsub.row(align=True) + + row.operator( + "wm.addon_expand", + icon='TRIA_DOWN' if info["show_expanded"] else 'TRIA_RIGHT', + emboss=False, + ).module = module_name - row.operator("wm.addon_expand", icon='TRIA_DOWN' if info["show_expanded"] else 'TRIA_RIGHT', emboss=False).module = module_name + row.operator( + "wm.addon_disable" if is_enabled else "wm.addon_enable", + icon='CHECKBOX_HLT' if is_enabled else 'CHECKBOX_DEHLT', text="", + emboss=False, + ).module = module_name sub = row.row() sub.active = is_enabled @@ -1327,11 +1337,6 @@ class USERPREF_PT_addons(Panel): # icon showing support level. sub.label(icon=self._support_icon_mapping.get(info["support"], 'QUESTION')) - if is_enabled: - row.operator("wm.addon_disable", icon='CHECKBOX_HLT', text="", emboss=False).module = module_name - else: - row.operator("wm.addon_enable", icon='CHECKBOX_DEHLT', text="", emboss=False).module = module_name - # Expanded UI (only if additional info is available) if info["show_expanded"]: if info["description"]: -- cgit v1.2.3