diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-27 00:00:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-27 00:00:45 +0400 |
commit | f6eed88a7883e07f00949f3952f9214fa70cb996 (patch) | |
tree | d3c2dfd9a007eaabb3e553274e36a9e807ff0d1c /release | |
parent | ebde8a7ccc2b897b8f788fe8fb7266b638d4b22f (diff) |
- changed recent commit from William to have enum in user preferences as an expanded enum (like it was before)
- rename 'no_bg' argument to 'emboss' (and negated)
- added 'emboss' option for operator buttons.
- Addon UI Layout slight modifications, changed enable/disable buttons for checkbox, grey out text of disabled addons to make it obvious at a glance whats enabled.
- column expanded enums now align text to the left.
- renamed ui_item_enum_row to ui_item_enum_expand since its used for columns and rows.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/space_userpref.py | 38 | ||||
-rw-r--r-- | release/scripts/ui/space_userpref_keymap.py | 8 | ||||
-rw-r--r-- | release/scripts/ui/space_view3d.py | 2 |
3 files changed, 20 insertions, 28 deletions
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 807779c8556..96b422a3e0d 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -533,13 +533,16 @@ class USERPREF_PT_theme(bpy.types.Panel): theme = context.user_preferences.themes[0] + split_themes = layout.split(percentage=0.2) + split_themes.prop(theme, "theme_area", expand=True) + split = layout.split(percentage=0.4) - split.prop(theme, "theme_area", text="") + layout.separator() layout.separator() - split = layout.split() + split = split_themes.split() if theme.theme_area == 'USER_INTERFACE': col = split.column() @@ -737,7 +740,7 @@ class USERPREF_PT_input(InputKeyMapPanel): sub.label(text="Presets:") subrow = sub.row(align=True) subrow.menu("USERPREF_MT_interaction_presets", text=bpy.types.USERPREF_MT_interaction_presets.bl_label) - subrow.operator("wm.interaction_preset_add", text="", icon="ZOOMIN") + subrow.operator("wm.interaction_preset_add", text="", icon='ZOOMIN') sub.separator() sub.label(text="Mouse:") @@ -883,27 +886,16 @@ class USERPREF_PT_addons(bpy.types.Panel): column = box.column() row = column.row() - # Arrow # - # If there are Infos or UI is expanded - if info["expanded"]: - row.operator("wm.addon_expand", icon="TRIA_DOWN").module = module_name - elif info["author"] or info["version"] or info["wiki_url"] or info["location"]: - row.operator("wm.addon_expand", icon="TRIA_RIGHT").module = module_name - else: - # Else, block UI - arrow = row.column() - arrow.enabled = False - arrow.operator("wm.addon_expand", icon="TRIA_RIGHT").module = module_name - - row.label(text=info["name"]) - - if is_enabled: operator = "wm.addon_disable" - else: operator = "wm.addon_enable" + row.operator("wm.addon_expand", icon='TRIA_DOWN' if info["expanded"] else 'TRIA_RIGHT', emboss=False).module = module_name - if info["warning"]: button_icon='ERROR' - else: button_icon='BLENDER' + rowsub = row.row() + rowsub.active = is_enabled + rowsub.label(text=info["name"], icon='ERROR' if info["warning"] else 'BLENDER') - row.operator(operator, icon=button_icon).module = module_name + 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 infos are available) if info["expanded"]: @@ -957,7 +949,7 @@ class USERPREF_PT_addons(bpy.types.Panel): column = box.column() row = column.row() - row.label(text=ext, icon="ERROR") + row.label(text=ext, icon='ERROR') row.operator("wm.addon_disable").module = ext from bpy.props import * diff --git a/release/scripts/ui/space_userpref_keymap.py b/release/scripts/ui/space_userpref_keymap.py index 37007c65f7a..55df622e277 100644 --- a/release/scripts/ui/space_userpref_keymap.py +++ b/release/scripts/ui/space_userpref_keymap.py @@ -167,7 +167,7 @@ class InputKeyMapPanel(bpy.types.Panel): col = self.indented_layout(layout, level) row = col.row() - row.prop(km, "children_expanded", text="", no_bg=True) + row.prop(km, "children_expanded", text="", emboss=False) row.label(text=km.name) row.label() @@ -186,7 +186,7 @@ class InputKeyMapPanel(bpy.types.Panel): # equal in hierarchy to the other children categories subcol = self.indented_layout(col, level + 1) subrow = subcol.row() - subrow.prop(km, "items_expanded", text="", no_bg=True) + subrow.prop(km, "items_expanded", text="", emboss=False) subrow.label(text="%s (Global)" % km.name) else: km.items_expanded = True @@ -227,11 +227,11 @@ class InputKeyMapPanel(bpy.types.Panel): # header bar row = split.row() - row.prop(kmi, "expanded", text="", no_bg=True) + row.prop(kmi, "expanded", text="", emboss=False) row = split.row() row.enabled = km.user_defined - row.prop(kmi, "active", text="", no_bg=True) + row.prop(kmi, "active", text="", emboss=False) if km.modal: row.prop(kmi, "propvalue", text="") diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 19140a9e79d..750ffabe89a 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -2125,7 +2125,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel): layout.active = view.display_background_images box = layout.box() row = box.row(align=True) - row.prop(bg, "show_expanded", text="", no_bg=True) + row.prop(bg, "show_expanded", text="", emboss=False) row.label(text=getattr(bg.image, "name", "Not Set")) row.operator("view3d.remove_background_image", text="", icon='X').index = i |