Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-16 20:42:26 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-17 13:28:56 +0300
commitf351c7bf23a3a794582b12c53ccba864f04ae944 (patch)
treeba49076724e62c335cbffe4fb43ba77b9f2745a6 /release
parent944d6f11cb7a0942c308d50e7fdbbf58a38463c9 (diff)
Preferences: tweak themes/addons/keyamps buttons at the top.
Make layouts more consistent between them, give more room for search field. Addon online resources links were removed as the links are dead.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/rna_keymap_ui.py22
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py56
2 files changed, 24 insertions, 54 deletions
diff --git a/release/scripts/modules/rna_keymap_ui.py b/release/scripts/modules/rna_keymap_ui.py
index 268bcb6a7be..cc54a7b01b5 100644
--- a/release/scripts/modules/rna_keymap_ui.py
+++ b/release/scripts/modules/rna_keymap_ui.py
@@ -368,22 +368,14 @@ def draw_keymaps(context, layout):
kc_active = wm.keyconfigs.active
spref = context.space_data
- subsplit = layout.split()
- subcol = subsplit.column()
-
- col = subcol.column()
-
# row.prop_search(wm.keyconfigs, "active", wm, "keyconfigs", text="Key Config")
text = bpy.path.display_name(kc_active.name)
if not text:
text = "Blender (default)"
- row = col.row()
-
- row.operator("wm.keyconfig_import", text="Import...", icon='IMPORT')
- row.operator("wm.keyconfig_export", text="Export...", icon='EXPORT')
+ split = layout.split(factor=0.6)
- row.separator()
+ row = split.row()
rowsub = row.row(align=True)
@@ -391,10 +383,16 @@ def draw_keymaps(context, layout):
rowsub.operator("wm.keyconfig_preset_add", text="", icon='ADD')
rowsub.operator("wm.keyconfig_preset_add", text="", icon='REMOVE').remove_active = True
+ rowsub = split.row(align=True)
+ rowsub.operator("wm.keyconfig_import", text="Import...", icon='IMPORT')
+ rowsub.operator("wm.keyconfig_export", text="Export...", icon='EXPORT')
+
+ row = layout.row()
+ col = layout.column()
+
# layout.context_pointer_set("keyconfig", wm.keyconfigs.active)
# row.operator("wm.keyconfig_remove", text="", icon='X')
- row.separator()
- rowsub = row.split(factor=0.33, align=True)
+ rowsub = row.split(factor=0.3, align=True)
# postpone drawing into rowsub, so we can set alert!
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 2f2c85eeffc..3e42b27ffc0 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -727,16 +727,17 @@ class USERPREF_PT_theme(Panel):
def draw(self, _context):
layout = self.layout
- row = layout.row()
+ split = layout.split(factor=0.6)
+
+ row = split.row(align=True)
+ row.menu("USERPREF_MT_interface_theme_presets", text=USERPREF_MT_interface_theme_presets.bl_label)
+ row.operator("wm.interface_theme_preset_add", text="", icon='ADD')
+ row.operator("wm.interface_theme_preset_add", text="", icon='REMOVE').remove_active = True
+ row = split.row(align=True)
row.operator("wm.theme_install", text="Install...", icon='IMPORT')
row.operator("ui.reset_default_theme", text="Reset", icon='LOOP_BACK')
- subrow = row.row(align=True)
- subrow.menu("USERPREF_MT_interface_theme_presets", text=USERPREF_MT_interface_theme_presets.bl_label)
- subrow.operator("wm.interface_theme_preset_add", text="", icon='ADD')
- subrow.operator("wm.interface_theme_preset_add", text="", icon='REMOVE').remove_active = True
-
class USERPREF_PT_theme_user_interface(PreferencePanel):
bl_space_type = 'PREFERENCES'
@@ -1568,41 +1569,12 @@ class USERPREF_PT_keymap(Panel):
# start = time.time()
- col = layout.column()
-
# Keymap Settings
- draw_keymaps(context, col)
+ draw_keymaps(context, layout)
# print("runtime", time.time() - start)
-class USERPREF_MT_addons_online_resources(Menu):
- bl_label = "Online Resources"
-
- # menu to open web-pages with addons development guides
- def draw(self, _context):
- layout = self.layout
-
- layout.operator(
- "wm.url_open", text="Add-ons Catalog", icon='URL',
- ).url = "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts"
-
- layout.separator()
-
- layout.operator(
- "wm.url_open", text="How to share your add-on", icon='URL',
- ).url = "http://wiki.blender.org/index.php/Dev:Py/Sharing"
- layout.operator(
- "wm.url_open", text="Add-on Guidelines", icon='URL',
- ).url = "http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons"
- layout.operator(
- "wm.url_open", text="API Concepts", icon='URL',
- ).url = bpy.types.WM_OT_doc_view._prefix + "/info_quickstart.html"
- layout.operator(
- "wm.url_open", text="Add-on Tutorial", icon='URL',
- ).url = bpy.types.WM_OT_doc_view._prefix + "/info_tutorial_addon.html"
-
-
class USERPREF_PT_addons(Panel):
bl_space_type = 'PREFERENCES'
bl_label = "Add-ons"
@@ -1675,15 +1647,16 @@ class USERPREF_PT_addons(Panel):
for mod in addon_utils.modules(refresh=False)
]
- row = layout.row()
+ split = layout.split(factor=0.6)
+
+ row = split.row()
+ row.prop(context.window_manager, "addon_support", expand=True)
+
+ row = split.row(align=True)
row.operator("wm.addon_install", icon='IMPORT', text="Install...")
row.operator("wm.addon_refresh", icon='FILE_REFRESH', text="Refresh")
- row.menu("USERPREF_MT_addons_online_resources", text="Online Resources")
-
- layout.separator()
row = layout.row()
- row.prop(context.window_manager, "addon_support", expand=True)
row.prop(context.window_manager, "addon_filter", text="")
row.prop(context.window_manager, "addon_search", text="", icon='VIEWZOOM')
@@ -2085,7 +2058,6 @@ classes += (
USERPREF_PT_input_view_fly_walk_gravity,
USERPREF_PT_keymap,
- USERPREF_MT_addons_online_resources,
USERPREF_PT_addons,
USERPREF_PT_studiolight_add,