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.
This commit is contained in:
Campbell Barton 2016-01-11 20:22:14 +11:00
parent ff1121c716
commit bedd78904d

@ -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"]: