Add theme options for new project settings editor
This commit is contained in:
parent
5cc304b9a7
commit
c8583415e5
|
@ -898,6 +898,33 @@ const bTheme U_theme_default = {
|
|||
.outline_width = 1,
|
||||
.facedot_size = 4,
|
||||
},
|
||||
.space_project_settings = {
|
||||
.back = RGBA(0x30303000),
|
||||
.title = RGBA(0xeeeeeeff),
|
||||
.text = RGBA(0xe6e6e6ff),
|
||||
.text_hi = RGBA(0xffffffff),
|
||||
.header = RGBA(0x303030b3),
|
||||
.header_text = RGBA(0xeeeeeeff),
|
||||
.header_text_hi = RGBA(0xffffffff),
|
||||
.tab_active = RGBA(0x303030ff),
|
||||
.tab_inactive = RGBA(0x1d1d1dff),
|
||||
.tab_back = RGBA(0x181818ff),
|
||||
.tab_outline = RGBA(0x3d3d3dff),
|
||||
.button = RGBA(0x1d1d1dff),
|
||||
.button_title = RGBA(0xffffffff),
|
||||
.button_text = RGBA(0xccccccff),
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x303030ff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.vertex_size = 3,
|
||||
.outline_width = 1,
|
||||
.facedot_size = 4,
|
||||
},
|
||||
.space_console = {
|
||||
.back = RGBA(0x1d1d1d00),
|
||||
.title = RGBA(0xeeeeeeff),
|
||||
|
|
|
@ -1135,6 +1135,40 @@
|
|||
</space>
|
||||
</ThemePreferences>
|
||||
</preferences>
|
||||
<project_settings>
|
||||
<ThemeProjectSettings>
|
||||
<space>
|
||||
<ThemeSpaceGeneric
|
||||
back="#b3b3b3"
|
||||
title="#181818"
|
||||
text="#000000"
|
||||
text_hi="#ffffff"
|
||||
header="#b3b3b3ff"
|
||||
header_text="#000000"
|
||||
header_text_hi="#ffffff"
|
||||
button="#7272727f"
|
||||
button_title="#000000"
|
||||
button_text="#000000"
|
||||
button_text_hi="#000000"
|
||||
navigation_bar="#b3b3b3ff"
|
||||
execution_buts="#b3b3b3ff"
|
||||
tab_active="#6697e6"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#b3b3b300"
|
||||
back="#a3a3a3cc"
|
||||
sub_back="#00000024"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
</ThemeProjectSettings>
|
||||
</project_settings>
|
||||
<console>
|
||||
<ThemeConsole
|
||||
line_output="#6080ff"
|
||||
|
|
|
@ -98,6 +98,7 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
|
|||
*/
|
||||
{
|
||||
/* Keep this block, even when empty. */
|
||||
btheme->space_project_settings = btheme->space_preferences;
|
||||
}
|
||||
|
||||
#undef FROM_DEFAULT_V4_UCHAR
|
||||
|
|
|
@ -129,6 +129,9 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
|||
case SPACE_USERPREF:
|
||||
ts = &btheme->space_preferences;
|
||||
break;
|
||||
case SPACE_PROJECT_SETTINGS:
|
||||
ts = &btheme->space_project_settings;
|
||||
break;
|
||||
case SPACE_CONSOLE:
|
||||
ts = &btheme->space_console;
|
||||
break;
|
||||
|
|
|
@ -487,6 +487,7 @@ typedef struct bTheme {
|
|||
ThemeSpace space_outliner;
|
||||
ThemeSpace space_node;
|
||||
ThemeSpace space_preferences;
|
||||
ThemeSpace space_project_settings;
|
||||
ThemeSpace space_console;
|
||||
ThemeSpace space_clip;
|
||||
ThemeSpace space_topbar;
|
||||
|
|
|
@ -2514,6 +2514,21 @@ static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
|
|||
rna_def_userdef_theme_spaces_main(srna);
|
||||
}
|
||||
|
||||
static void rna_def_userdef_theme_space_project_settings(BlenderRNA *brna)
|
||||
{
|
||||
StructRNA *srna;
|
||||
|
||||
/* space_userpref */
|
||||
|
||||
srna = RNA_def_struct(brna, "ThemeProjectSettings", NULL);
|
||||
RNA_def_struct_sdna(srna, "ThemeSpace");
|
||||
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
|
||||
RNA_def_struct_ui_text(
|
||||
srna, "Theme Project Settings", "Theme settings for the Blender project settings editor");
|
||||
|
||||
rna_def_userdef_theme_spaces_main(srna);
|
||||
}
|
||||
|
||||
static void rna_def_userdef_theme_space_console(BlenderRNA *brna)
|
||||
{
|
||||
StructRNA *srna;
|
||||
|
@ -3854,6 +3869,8 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
|
|||
{11, "PROPERTIES", ICON_PROPERTIES, "Properties", ""},
|
||||
{12, "OUTLINER", ICON_OUTLINER, "Outliner", ""},
|
||||
{14, "PREFERENCES", ICON_PREFERENCES, "Preferences", ""},
|
||||
/* TODO icon */
|
||||
{24, "PROJECT_SETTINGS", ICON_PREFERENCES, "Project Settings", ""},
|
||||
{15, "INFO", ICON_INFO, "Info", ""},
|
||||
{16, "FILE_BROWSER", ICON_FILEBROWSER, "File Browser", ""},
|
||||
{17, "CONSOLE", ICON_CONSOLE, "Python Console", ""},
|
||||
|
@ -3966,6 +3983,12 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
|
|||
RNA_def_property_struct_type(prop, "ThemePreferences");
|
||||
RNA_def_property_ui_text(prop, "Preferences", "");
|
||||
|
||||
prop = RNA_def_property(srna, "project_settings", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "space_project_settings");
|
||||
RNA_def_property_struct_type(prop, "ThemeProjectSettings");
|
||||
RNA_def_property_ui_text(prop, "Project Settings", "");
|
||||
|
||||
prop = RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "space_console");
|
||||
|
@ -4250,6 +4273,7 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna)
|
|||
rna_def_userdef_theme_space_outliner(brna);
|
||||
rna_def_userdef_theme_space_info(brna);
|
||||
rna_def_userdef_theme_space_userpref(brna);
|
||||
rna_def_userdef_theme_space_project_settings(brna);
|
||||
rna_def_userdef_theme_space_console(brna);
|
||||
rna_def_userdef_theme_space_clip(brna);
|
||||
rna_def_userdef_theme_space_topbar(brna);
|
||||
|
|
Loading…
Reference in New Issue