Merge pull request #61455 from fire-forge/tab

Add color contrast to TabContainer backgrounds in the editor
This commit is contained in:
Rémi Verschelde
2022-05-31 12:52:03 +02:00
committed by GitHub
10 changed files with 16 additions and 10 deletions

View File

@@ -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();