diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2018-11-25 18:21:35 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2018-11-25 19:08:58 +0300 |
commit | b00963afc14978b2de7f2859525bf89612aa4aee (patch) | |
tree | f83ec02a96b84019735037528e31e827dcc0dbd6 /release/scripts/startup/bl_ui | |
parent | 3135ed376bba357f3a41f7025db3fb79fd6c0f61 (diff) |
UI: Initial User-Preferences redesign
Implements the first changes for T54115:
* Rename "User Preferences" window to "Settings" in the UI.
We'll likely put workspace settings in there, separate from the global
user settings. System settings should become separate from user
settings in future to allow settings for specific hardware.
* Add sidebar region for navigation (scrolls independently).
Addresses space problems, so we can add more categories as needed now.
* Increase size of Settings window to compensate new navigation bar.
* Group sections into User Preferences and System.
Icons for section groups by Andrzej Ambroz. Thanks!
* Bumps subversion for file compatibility.
Screenshot: https://developer.blender.org/F5715337
I also added categories for future work, but commented them out.
We may also want to redesign contents of each section now.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D3088
Design Task: https://developer.blender.org/T54115
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/space_topbar.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 22 |
2 files changed, 15 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 8b9c47839e9..4fc2b12e950 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -828,7 +828,7 @@ class TOPBAR_MT_edit(Menu): layout.separator() - layout.operator("screen.userpref_show", text="User Preferences...", icon='PREFERENCES') + layout.operator("screen.settings_show", text="Settings...", icon='PREFERENCES') class TOPBAR_MT_window(Menu): @@ -981,7 +981,7 @@ class TOPBAR_MT_window_specials(Menu): layout.separator() - layout.operator("screen.userpref_show", text="User Preferences...", icon='PREFERENCES') + layout.operator("screen.settings_show", text="Settings...", icon='PREFERENCES') class TOPBAR_MT_workspace_menu(Menu): diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 954326f8899..22fb5af5c58 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -59,10 +59,10 @@ class USERPREF_HT_header(Header): layout.operator("wm.save_userpref") -class USERPREF_PT_tabs(Panel): +class USERPREF_PT_navigation(Panel): bl_label = "" bl_space_type = 'USER_PREFERENCES' - bl_region_type = 'WINDOW' + bl_region_type = 'NAVIGATION_BAR' bl_options = {'HIDE_HEADER'} def draw(self, context): @@ -70,7 +70,11 @@ class USERPREF_PT_tabs(Panel): userpref = context.user_preferences - layout.row().prop(userpref, "active_section", expand=True) + col = layout.column() + + col.scale_x = 1.3 + col.scale_y = 1.3 + col.prop(userpref, "active_section", expand=True) class USERPREF_PT_interface(Panel): @@ -331,16 +335,16 @@ class USERPREF_PT_edit(Panel): col.prop(edit, "use_duplicate_particle", text="Particle") -class USERPREF_PT_system(Panel): +class USERPREF_PT_system_general(Panel): bl_space_type = 'USER_PREFERENCES' - bl_label = "System" + bl_label = "System General" bl_region_type = 'WINDOW' bl_options = {'HIDE_HEADER'} @classmethod def poll(cls, context): userpref = context.user_preferences - return (userpref.active_section == 'SYSTEM') + return (userpref.active_section == 'SYSTEM_GENERAL') def draw(self, context): import sys @@ -880,7 +884,7 @@ class USERPREF_PT_file(Panel): @classmethod def poll(cls, context): userpref = context.user_preferences - return (userpref.active_section == 'FILES') + return (userpref.active_section == 'SYSTEM_FILES') def draw(self, context): layout = self.layout @@ -1572,10 +1576,10 @@ class USERPREF_PT_studiolight_specular(Panel, StudioLightPanelMixin): classes = ( USERPREF_HT_header, - USERPREF_PT_tabs, + USERPREF_PT_navigation, USERPREF_PT_interface, USERPREF_PT_edit, - USERPREF_PT_system, + USERPREF_PT_system_general, USERPREF_MT_interface_theme_presets, USERPREF_PT_theme, USERPREF_PT_file, |