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
This commit is contained in:
Julian Eisel
2018-11-25 16:21:35 +01:00
parent 3135ed376b
commit b00963afc1
16 changed files with 181 additions and 42 deletions

View File

@@ -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,