diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index a61398b85ed..31efe128d03 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -272,6 +272,8 @@ const bTheme U_theme_default = { .panel_back = RGBA(0x3d3d3dff), .panel_sub_back = RGBA(0x0000001f), .panel_outline = RGBA(0xffffff11), + .panel_title = RGBA(0xe6e6e600), + .panel_text = RGBA(0xe6e6e600), }, .space_properties = { .back = RGBA(0x30303000), @@ -283,9 +285,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x1d1d1d00), .button = RGBA(0x303030ff), - .button_title = RGBA(0xffffff00), - .button_text = RGBA(0xcccccc00), - .button_text_hi = RGBA(0xffffff00), .active = RGBA(0x4772b3ff), .vertex_size = 3, .outline_width = 1, @@ -303,9 +302,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x18181800), .button = RGBA(0x30303000), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .grid = RGBA(0x54545480), .wire = RGBA(0x000000ff), .wire_edit = RGBA(0x000000ff), @@ -392,9 +388,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x18181800), .button = RGBA(0x30303000), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .hilite = RGBA(0x4772b3ff), .vertex_size = 3, .outline_width = 1, @@ -411,9 +404,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x18181800), .button = RGBA(0x30303000), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .list = RGBA(0x1d1d1dff), .list_title = RGBA(0xffffffff), .list_text = RGBA(0xb8b8b8ff), @@ -481,9 +471,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x18181800), .button = RGBA(0x22222200), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .list = RGBA(0x1d1d1dff), .list_title = RGBA(0xffffffff), .list_text = RGBA(0xb8b8b8ff), @@ -536,9 +523,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x18181800), .button = RGBA(0x30303000), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .list = RGBA(0x1d1d1dff), .list_title = RGBA(0xffffffff), .list_text = RGBA(0xb8b8b8ff), @@ -582,9 +566,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x18181800), .button = RGBA(0x30303000), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .list = RGBA(0x18181800), .list_title = RGBA(0xffffffff), .list_text = RGBA(0xffffffff), @@ -647,9 +628,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x18181800), .button = RGBA(0x30303000), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .grid = RGBA(0x303030ff), .wire_edit = RGBA(0xc0c0c0ff), .vertex_select = RGBA(0xff8500ff), @@ -694,9 +672,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x18181800), .button = RGBA(0x30303000), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .shade2 = RGBA(0x4d4d4de6), .hilite = RGBA(0x71a8ffff), .grid = RGBA(0x1d1d1dff), @@ -742,9 +717,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x18181800), .button = RGBA(0x30303000), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .list = RGBA(0x303030ff), .list_title = RGBA(0xffffffff), .list_text = RGBA(0xb8b8b8ff), @@ -799,9 +771,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x30303000), .button = RGBA(0x303030ff), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .vertex_size = 3, .outline_width = 1, .facedot_size = 4, @@ -834,9 +803,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x18181800), .button = RGBA(0x30303000), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .list = RGBA(0x303030ff), .list_title = RGBA(0xffffff00), .list_text = RGBA(0xb8b8b8ff), @@ -908,9 +874,6 @@ const bTheme U_theme_default = { .header_text_hi = RGBA(0xffffffff), .tab_back = RGBA(0x18181800), .button = RGBA(0x30303000), - .button_title = RGBA(0xffffffff), - .button_text = RGBA(0xccccccff), - .button_text_hi = RGBA(0xffffffff), .list = RGBA(0x303030ff), .list_title = RGBA(0xc3c3c3ff), .list_text = RGBA(0xb8b8b8ff), diff --git a/scripts/presets/interface_theme/Blender_Light.xml b/scripts/presets/interface_theme/Blender_Light.xml index 6145ed73d11..3fea32adb57 100644 --- a/scripts/presets/interface_theme/Blender_Light.xml +++ b/scripts/presets/interface_theme/Blender_Light.xml @@ -13,6 +13,8 @@ widget_text_cursor="#3399e6" panel_roundness="0.4" panel_header="#ccccccff" + panel_title="#1a1a1a" + panel_text="#1a1a1a" panel_back="#ccccccff" panel_sub_back="#0000001f" panel_outline="#ffffff22" @@ -463,9 +465,6 @@ @@ -550,9 +549,6 @@ @@ -579,9 +575,6 @@ @@ -639,9 +632,6 @@ @@ -709,9 +699,6 @@ @@ -779,9 +766,6 @@ @@ -852,9 +836,6 @@ @@ -881,9 +862,6 @@ @@ -920,9 +898,6 @@ @@ -980,9 +955,6 @@ @@ -1058,9 +1030,6 @@ @@ -1148,9 +1117,6 @@ @@ -1208,9 +1174,6 @@ diff --git a/scripts/startup/bl_ui/space_userpref.py b/scripts/startup/bl_ui/space_userpref.py index 3a1b0ace7ec..feddd06fd69 100644 --- a/scripts/startup/bl_ui/space_userpref.py +++ b/scripts/startup/bl_ui/space_userpref.py @@ -1113,7 +1113,11 @@ class USERPREF_PT_theme_interface_panel(ThemePanel, CenterAlignMixIn, Panel): col.prop(ui, "panel_back", text="Background") col.prop(ui, "panel_sub_back", text="Sub-Panel") - col = flow.column() + col = flow.column(align=True) + col.prop(ui, "panel_title", text="Title") + col.prop(ui, "panel_text", text="Text") + + col = col.column() col.prop(ui, "panel_outline", text="Outline") col.prop(ui, "panel_roundness", text="Roundness") diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 16d9158f641..852e73ebbb0 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -27,7 +27,7 @@ /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 24 +#define BLENDER_FILE_SUBVERSION 25 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and cancel loading the file, showing a warning to diff --git a/source/blender/blenloader/intern/versioning_userdef.cc b/source/blender/blenloader/intern/versioning_userdef.cc index 4d4edcebf37..935c11df2df 100644 --- a/source/blender/blenloader/intern/versioning_userdef.cc +++ b/source/blender/blenloader/intern/versioning_userdef.cc @@ -332,11 +332,13 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) } if (!USER_VERSION_ATLEAST(500, 24)) { + FROM_DEFAULT_V4_UCHAR(tui.panel_title); + FROM_DEFAULT_V4_UCHAR(tui.panel_text); + } + + if (!USER_VERSION_ATLEAST(500, 25)) { FROM_DEFAULT_V4_UCHAR(space_properties.tab_back); FROM_DEFAULT_V4_UCHAR(space_properties.button); - FROM_DEFAULT_V4_UCHAR(space_properties.button_title); - FROM_DEFAULT_V4_UCHAR(space_properties.button_text); - FROM_DEFAULT_V4_UCHAR(space_properties.button_text_hi); } /** diff --git a/source/blender/editors/include/UI_resources.hh b/source/blender/editors/include/UI_resources.hh index ccdf5590cbb..70aec9dc1b7 100644 --- a/source/blender/editors/include/UI_resources.hh +++ b/source/blender/editors/include/UI_resources.hh @@ -78,8 +78,6 @@ enum ThemeColorID { TH_PANEL_OUTLINE, TH_BUTBACK, - TH_BUTBACK_TEXT, - TH_BUTBACK_TEXT_HI, TH_SHADE1, TH_SHADE2, diff --git a/source/blender/editors/interface/resources.cc b/source/blender/editors/interface/resources.cc index 876ee23c869..12bee7bb808 100644 --- a/source/blender/editors/interface/resources.cc +++ b/source/blender/editors/interface/resources.cc @@ -202,8 +202,10 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) setting = ts->background_type; break; case TH_TEXT: - if (g_theme_state.regionid == RGN_TYPE_WINDOW) { - cp = ts->text; + if (ELEM(g_theme_state.regionid, RGN_TYPE_UI, RGN_TYPE_TOOLS) || + ELEM(g_theme_state.spacetype, SPACE_PROPERTIES, SPACE_USERPREF)) + { + cp = btheme->tui.panel_text; } else if (g_theme_state.regionid == RGN_TYPE_CHANNELS) { cp = ts->list_text; @@ -216,14 +218,11 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) cp = ts->header_text; } else { - cp = ts->button_text; + cp = ts->text; } break; case TH_TEXT_HI: - if (g_theme_state.regionid == RGN_TYPE_WINDOW) { - cp = ts->text_hi; - } - else if (g_theme_state.regionid == RGN_TYPE_CHANNELS) { + if (g_theme_state.regionid == RGN_TYPE_CHANNELS) { cp = ts->list_text_hi; } else if (ELEM(g_theme_state.regionid, @@ -234,12 +233,14 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) cp = ts->header_text_hi; } else { - cp = ts->button_text_hi; + cp = ts->text_hi; } break; case TH_TITLE: - if (g_theme_state.regionid == RGN_TYPE_WINDOW) { - cp = ts->title; + if (ELEM(g_theme_state.regionid, RGN_TYPE_UI, RGN_TYPE_TOOLS) || + ELEM(g_theme_state.spacetype, SPACE_PROPERTIES, SPACE_USERPREF)) + { + cp = btheme->tui.panel_title; } else if (g_theme_state.regionid == RGN_TYPE_CHANNELS) { cp = ts->list_title; @@ -252,7 +253,7 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) cp = ts->header_title; } else { - cp = ts->button_title; + cp = ts->title; } break; @@ -283,12 +284,6 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_BUTBACK: cp = ts->button; break; - case TH_BUTBACK_TEXT: - cp = ts->button_text; - break; - case TH_BUTBACK_TEXT_HI: - cp = ts->button_text_hi; - break; case TH_TAB_TEXT: cp = btheme->tui.wcol_tab.text; diff --git a/source/blender/makesdna/DNA_theme_types.h b/source/blender/makesdna/DNA_theme_types.h index f6b0af8ca20..bcc075cb936 100644 --- a/source/blender/makesdna/DNA_theme_types.h +++ b/source/blender/makesdna/DNA_theme_types.h @@ -206,6 +206,8 @@ typedef struct ThemeUI { unsigned char panel_back[4]; unsigned char panel_sub_back[4]; unsigned char panel_outline[4]; + unsigned char panel_title[4]; + unsigned char panel_text[4]; char _pad2[4]; } ThemeUI; @@ -246,10 +248,7 @@ typedef struct ThemeSpace { /* button/tool regions */ /** Region background. */ unsigned char button[4]; - /** Panel title. */ - unsigned char button_title[4]; - unsigned char button_text[4]; - unsigned char button_text_hi[4]; + unsigned char _pad3[4]; /* List-view regions. */ /** Region background. */ diff --git a/source/blender/makesrna/intern/rna_userdef.cc b/source/blender/makesrna/intern/rna_userdef.cc index f7103c82f68..9be2271a4d4 100644 --- a/source/blender/makesrna/intern/rna_userdef.cc +++ b/source/blender/makesrna/intern/rna_userdef.cc @@ -1982,6 +1982,16 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Panel Header", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "panel_title", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Panel Title", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "panel_text", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Panel Text", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "panel_back", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_ui_text(prop, "Panel Background", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); @@ -2218,21 +2228,6 @@ static void rna_def_userdef_theme_space_region_generic(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Region Background", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - prop = RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Region Text Titles", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Region Text", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Region Text Highlight", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - /* tabs */ prop = RNA_def_property(srna, "tab_back", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 4); diff --git a/source/blender/windowmanager/intern/wm_window.cc b/source/blender/windowmanager/intern/wm_window.cc index 7fda1b4e1d7..6d9a9d18d05 100644 --- a/source/blender/windowmanager/intern/wm_window.cc +++ b/source/blender/windowmanager/intern/wm_window.cc @@ -662,7 +662,7 @@ static void wm_window_decoration_style_set_from_theme(const wmWindow *win, const float titlebar_bg_color[3], titlebar_fg_color[3]; UI_GetThemeColor3fv(TH_BACK, titlebar_bg_color); - UI_GetThemeColor3fv(TH_BUTBACK_TEXT, titlebar_fg_color); + UI_GetThemeColor3fv(TH_TEXT, titlebar_fg_color); copy_v3_v3(decoration_settings.colored_titlebar_bg_color, titlebar_bg_color); copy_v3_v3(decoration_settings.colored_titlebar_fg_color, titlebar_fg_color);