summaryrefslogtreecommitdiffstats
path: root/editor/editor_themes.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-05-31 12:52:03 +0200
committerGitHub <noreply@github.com>2022-05-31 12:52:03 +0200
commit532e253a7c0544bfb4866fb00129cfa1d39fcd62 (patch)
tree3b636228558a1d352ee05d6e1acca6261169472e /editor/editor_themes.cpp
parentc881f607a90f6c6a7d8b5046ea155d881ede3ff1 (diff)
parenteb573da2b582c3ad0cb0585cd30b1005cd1cf1eb (diff)
downloadredot-engine-532e253a7c0544bfb4866fb00129cfa1d39fcd62.tar.gz
Merge pull request #61455 from fire-forge/tab
Add color contrast to TabContainer backgrounds in the editor
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r--editor/editor_themes.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 352cd453a7..c53c04af4e 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();