[Bf-blender-cvs] [96acf701597] userpref_redesign: Scale up layout & use icons for category groups
Julian Eisel
noreply at git.blender.org
Fri Nov 23 22:53:36 CET 2018
Commit: 96acf70159733fe94e8725222bb72ff1369f821b
Author: Julian Eisel
Date: Fri Nov 23 22:37:42 2018 +0100
Branches: userpref_redesign
https://developer.blender.org/rB96acf70159733fe94e8725222bb72ff1369f821b
Scale up layout & use icons for category groups
Icons were already prepared by @jendrzych. Thanks a lot!
===================================================================
M release/scripts/startup/bl_ui/space_userpref.py
M source/blender/editors/interface/interface_layout.c
M source/blender/makesrna/intern/rna_userdef.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index c8000610410..10e29afa591 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -72,6 +72,8 @@ class USERPREF_PT_navigation(Panel):
col = layout.column()
+ col.scale_x = 1.3
+ col.scale_y = 1.3
col.prop(userpref, "active_section", expand=True)
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 9aa36d29237..d82f67b9d69 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -698,7 +698,7 @@ static void ui_item_enum_expand_exec(
uiItemS(block->curlayout);
}
BLI_snprintf(group_name, group_name_len, "%s:", item->name);
- uiItemL(block->curlayout, group_name, ICON_NONE);
+ uiItemL(block->curlayout, group_name, item->icon);
}
else {
const EnumPropertyItem *next_item = item + 1;
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 1a74ff9a121..a62d2f6d934 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -4925,7 +4925,7 @@ void RNA_def_userdef(BlenderRNA *brna)
PropertyRNA *prop;
static const EnumPropertyItem user_pref_sections[] = {
- {0, "", 0, "User Preferences", ""},
+ {0, "", ICON_USER, "User Preferences", ""},
{USER_SECTION_EDIT, "EDITING", 0, "Editing", ""},
{USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""},
{USER_SECTION_INPUT, "INPUT", 0, "Input", ""},
@@ -4934,12 +4934,12 @@ void RNA_def_userdef(BlenderRNA *brna)
{USER_SECTION_LIGHT, "LIGHTS", 0, "Lights", ""},
{USER_SECTION_FILE, "FILES", 0, "File", ""},
#ifdef WITH_USERDEF_WORKSPACES
- {0, "", 0, "Workspaces", ""},
+ {0, "", ICON_WORKSPACE, "Workspaces", ""},
{USER_SECTION_WORKSPACE_CONFIG, "WORKSPACE_CONFIG", 0, "Configuration File", ""},
{USER_SECTION_WORKSPACE_ADDONS, "WORKSPACE_ADDONS", 0, "Add-on Overrides", ""},
{USER_SECTION_WORKSPACE_KEYMAPS, "WORKSPACE_KEYMAPS", 0, "Keymap Overrides", ""},
#endif
- {0, "", 0, "System", ""},
+ {0, "", ICON_SYSTEM, "System", ""},
{USER_SECTION_SYSTEM_GENERAL, "SYSTEM_GENERAL", 0, "General", ""},
#ifdef WITH_USERDEF_SYSTEM_SPLIT
{USER_SECTION_SYSTEM_DRAWING, "SYSTEM_DRAWING", 0, "Drawing", ""},
More information about the Bf-blender-cvs
mailing list