1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00

Tree - highlight selected items

This commit is contained in:
havi05
2024-12-14 17:06:36 +01:00
parent b0655dc86f
commit 03caf44f57
5 changed files with 51 additions and 9 deletions

View File

@@ -957,6 +957,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
p_theme->set_color(SceneStringName(font_color), "Tree", p_config.font_color);
p_theme->set_color("font_hovered_color", "Tree", p_config.mono_color);
p_theme->set_color("font_hovered_dimmed_color", "Tree", p_config.font_color);
p_theme->set_color("font_hovered_selected_color", "Tree", p_config.mono_color);
p_theme->set_color("font_selected_color", "Tree", p_config.mono_color);
p_theme->set_color("font_disabled_color", "Tree", p_config.font_disabled_color);
p_theme->set_color("font_outline_color", "Tree", p_config.font_outline_color);
@@ -1017,6 +1018,13 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
style_tree_hover_dimmed->set_border_width_all(0);
p_theme->set_stylebox("hovered_dimmed", "Tree", style_tree_hover_dimmed);
Ref<StyleBoxFlat> style_tree_hover_selected = style_tree_selected->duplicate();
style_tree_hover_selected->set_bg_color(p_config.highlight_color * Color(1, 1, 1, 1.2));
style_tree_hover_selected->set_border_width_all(0);
p_theme->set_stylebox("hovered_selected", "Tree", style_tree_hover_selected);
p_theme->set_stylebox("hovered_selected_focus", "Tree", style_tree_hover_selected);
p_theme->set_stylebox("selected_focus", "Tree", style_tree_focus);
p_theme->set_stylebox("selected", "Tree", style_tree_selected);