diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-01-11 12:22:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-11 12:30:23 +0300 |
commit | bedd78904d25c56d63c8220870a5fad67530035d (patch) | |
tree | 63c06219ee3eb88546c6ea656510d0759e0a0f59 /release | |
parent | ff1121c716f922da4eb7975419141344a2c42170 (diff) |
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.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 19 |
1 files changed, 12 insertions, 7 deletions
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"]: |