[Bf-blender-cvs] [bedd789] master: UI: Move checkbox for toggling addons to the LHS
Campbell Barton
noreply at git.blender.org
Mon Jan 11 10:39:23 CET 2016
Commit: bedd78904d25c56d63c8220870a5fad67530035d
Author: Campbell Barton
Date: Mon Jan 11 20:22:14 2016 +1100
Branches: master
https://developer.blender.org/rBbedd78904d25c56d63c8220870a5fad67530035d
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.
===================================================================
M release/scripts/startup/bl_ui/space_userpref.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index d4a8333..e6302ff 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"]:
More information about the Bf-blender-cvs
mailing list