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:
@@ -1314,9 +1314,19 @@ class USERPREF_PT_addons(Panel):
|
|||||||
col_box = col.column()
|
col_box = col.column()
|
||||||
box = col_box.box()
|
box = col_box.box()
|
||||||
colsub = box.column()
|
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 = row.row()
|
||||||
sub.active = is_enabled
|
sub.active = is_enabled
|
||||||
@@ -1327,11 +1337,6 @@ class USERPREF_PT_addons(Panel):
|
|||||||
# icon showing support level.
|
# icon showing support level.
|
||||||
sub.label(icon=self._support_icon_mapping.get(info["support"], 'QUESTION'))
|
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)
|
# Expanded UI (only if additional info is available)
|
||||||
if info["show_expanded"]:
|
if info["show_expanded"]:
|
||||||
if info["description"]:
|
if info["description"]:
|
||||||
|
Reference in New Issue
Block a user