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-17 16:31:18 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-17 17:04:38 +0300
commit1a3abc7f79aa8f4550addfb5925fc8c3786b4753 (patch)
tree9caacfa6f6becd5b3a225f056779f4a41e78b0e3 /release
parentbe079e742dcdc54f1e84ac2c23dda0490b8eea17 (diff)
Preferences: fit a little better when opened in place of properties editor.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 8f2d4b39f23..9b4f9b49a6b 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -35,6 +35,10 @@ class USERPREF_HT_header(Header):
layout.template_header()
+ layout.separator_spacer()
+
+ layout.operator("wm.save_userpref")
+
class USERPREF_PT_navigation_bar(Panel):
bl_label = "Preferences Navigation"
@@ -60,6 +64,15 @@ class USERPREF_PT_save_preferences(Panel):
bl_region_type = 'EXECUTE'
bl_options = {'HIDE_HEADER'}
+ @classmethod
+ def poll(cls, context):
+ # Hide when header is visible
+ for region in context.area.regions:
+ if region.type == 'HEADER' and region.height <= 1:
+ return True
+
+ return False
+
def draw(self, _context):
layout = self.layout
layout.operator_context = 'EXEC_AREA'