diff options
5 files changed, 21 insertions, 7 deletions
diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index 64721a4c4e2..7604a06f7df 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -238,11 +238,11 @@ const bTheme U_theme_default = { .menu_shadow_fac = 0.3f, .menu_shadow_width = 4, .editor_outline = RGBA(0x1f1f1fff), - .icon_alpha = 1.0f, - .icon_saturation = 0.5f, .transparent_checker_primary = RGBA(0x333333ff), .transparent_checker_secondary = RGBA(0x262626ff), .transparent_checker_size = 8, + .icon_alpha = 1.0f, + .icon_saturation = 0.5f, .widget_text_cursor = RGBA(0x3399e6ff), .xaxis = RGBA(0xff3352ff), .yaxis = RGBA(0x8bdc00ff), @@ -250,9 +250,9 @@ const bTheme U_theme_default = { .gizmo_hi = RGBA(0xffffffff), .gizmo_primary = RGBA(0xf5f14dff), .gizmo_secondary = RGBA(0x63ffffff), + .gizmo_view_align = RGBA(0xffffffff), .gizmo_a = RGBA(0x4da84dff), .gizmo_b = RGBA(0xa33535ff), - .gizmo_view_align = RGBA(0xffffffff), .icon_scene = RGBA(0xe6e6e6ff), .icon_collection = RGBA(0xf4f4f4ff), .icon_object = RGBA(0xee9e5dff), @@ -379,7 +379,7 @@ const bTheme U_theme_default = { .paint_curve_handle = RGBA(0x7fff7f7f), }, .space_file = { - .back = RGBA(0x33333300), + .back = RGBA(0x28282800), .title = RGBA(0xffffffff), .text = RGBA(0xe6e6e6ff), .text_hi = RGBA(0xffffffff), @@ -404,6 +404,7 @@ const bTheme U_theme_default = { .vertex_size = 3, .outline_width = 1, .facedot_size = 4, + .row_alternate = RGBA(0xffffff07), }, .space_graph = { .back = RGBA(0x42424200), diff --git a/release/scripts/presets/interface_theme/blender_light.xml b/release/scripts/presets/interface_theme/blender_light.xml index 6a5430c6ad1..1b48377f62c 100644 --- a/release/scripts/presets/interface_theme/blender_light.xml +++ b/release/scripts/presets/interface_theme/blender_light.xml @@ -534,13 +534,14 @@ </graph_editor> <file_browser> <ThemeFileBrowser + row_alternate="#ffffff0f" selected_file="#5680c2" > <space> <ThemeSpaceGeneric - back="#404040" + back="#999999" title="#000000" - text="#eeeeee" + text="#000000" text_hi="#ffffff" header="#adadadff" header_text="#000000" diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 1437d46bd8d..d04907872b7 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -228,6 +228,11 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) */ { /* Keep this block, even when empty. */ + + /* The new defaults for the file browser theme are the same as + * the outliner's, and it's less disruptive to just copy them. */ + copy_v4_v4_uchar(btheme->space_file.back, btheme->space_outliner.back); + copy_v4_v4_uchar(btheme->space_file.row_alternate, btheme->space_outliner.row_alternate); } #undef FROM_DEFAULT_V4_UCHAR diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 51e6c99ff39..7039eba7db1 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -441,7 +441,9 @@ static void draw_background(FileLayout *layout, View2D *v2d) uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); - immUniformThemeColorShade(TH_BACK, -7); + float col_alternating[4]; + UI_GetThemeColor4fv(TH_ROW_ALTERNATE, col_alternating); + immUniformThemeColorBlend(TH_BACK, TH_ROW_ALTERNATE, col_alternating[3]); /* alternating flat shade background */ for (i = 2; (i <= layout->rows + 1); i += 2) { diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 2cee99cd372..699e08302e7 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2478,6 +2478,11 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna) RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Selected File", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "row_alternate", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 4); + RNA_def_property_ui_text(prop, "Alternate Rows", "Overlay color on every other row"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); } static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna) |