diff options
author | FireForge <67974470+fire-forge@users.noreply.github.com> | 2022-05-26 21:12:09 -0500 |
---|---|---|
committer | FireForge <67974470+fire-forge@users.noreply.github.com> | 2022-05-26 21:19:15 -0500 |
commit | eb573da2b582c3ad0cb0585cd30b1005cd1cf1eb (patch) | |
tree | 87c2061b3e5c64fac4b308bb4cb0df1eea7c64df /editor/editor_themes.cpp | |
parent | 9d28e1027636ebf1750a65105f6a23a17210813d (diff) |
Use "odd" style for TabContainers on base BG color
- Use the "odd" style for TabContainers that are on a background with the same color as the default TabContainer background color to add contrast
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r-- | editor/editor_themes.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 550a73ed72..9efe7f81a0 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -1152,14 +1152,16 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { style_content_panel->set_border_color(dark_color_2); theme->set_stylebox("panel", "TabContainer", style_content_panel); - // These styleboxes can be used on tabs against the base color background (e.g. nested tabs). + // TabContainerOdd can be used on tabs against the base color background (e.g. nested tabs). + theme->set_type_variation("TabContainerOdd", "TabContainer"); + Ref<StyleBoxFlat> style_tab_selected_odd = style_tab_selected->duplicate(); style_tab_selected_odd->set_bg_color(disabled_bg_color); - theme->set_stylebox("tab_selected_odd", "TabContainer", style_tab_selected_odd); + theme->set_stylebox("tab_selected", "TabContainerOdd", style_tab_selected_odd); Ref<StyleBoxFlat> style_content_panel_odd = style_content_panel->duplicate(); style_content_panel_odd->set_bg_color(disabled_bg_color); - theme->set_stylebox("panel_odd", "TabContainer", style_content_panel_odd); + theme->set_stylebox("panel", "TabContainerOdd", style_content_panel_odd); // This stylebox is used in 3d and 2d viewports (no borders). Ref<StyleBoxFlat> style_content_panel_vp = style_content_panel->duplicate(); |