Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix Tree drop indicator color across all themes

vaner-orgee2bd0496f44
diff --git a/editor/themes/theme_classic.cpp b/editor/themes/theme_classic.cpp
index 1d3290d215f..a0bdbfbf4b1 100644
--- a/editor/themes/theme_classic.cpp
+++ b/editor/themes/theme_classic.cpp
@@ -672,7 +672,7 @@ void ThemeClassic::populate_standard_styles(const Ref<EditorTheme> &p_theme, Edi
p_theme->set_color("parent_hl_line_color", "Tree", parent_line_color);
p_theme->set_color("children_hl_line_color", "Tree", children_line_color);
p_theme->set_color("drop_on_item_color", "Tree", p_config.accent_color);
- p_theme->set_color("drop_position_color", "Tree", p_config.icon_normal_color);
+ p_theme->set_color("drop_position_color", "Tree", p_config.mono_color * Color(1, 1, 1, 1));
Ref<StyleBoxFlat> style_tree_btn = p_config.base_style->duplicate();
style_tree_btn->set_bg_color(p_config.highlight_color);
diff --git a/editor/themes/theme_modern.cpp b/editor/themes/theme_modern.cpp
index cdfc342e2e4..51039671c15 100644
--- a/editor/themes/theme_modern.cpp
+++ b/editor/themes/theme_modern.cpp
@@ -694,7 +694,7 @@ void ThemeModern::populate_standard_styles(const Ref<EditorTheme> &p_theme, Edit
p_theme->set_color("parent_hl_line_color", "Tree", highlight_line_color);
p_theme->set_color("children_hl_line_color", "Tree", relationship_line_color);
p_theme->set_color("drop_on_item_color", "Tree", p_config.accent_color);
- p_theme->set_color("drop_position_color", "Tree", p_config.icon_normal_color);
+ p_theme->set_color("drop_position_color", "Tree", p_config.mono_color * Color(1, 1, 1, 0.9));
p_theme->set_color("guide_color", "Tree", Color(1, 1, 1, 0));
p_theme->set_color("scroll_hint_color", "Tree", Color(0, 0, 0, p_config.dark_theme ? 1.0 : 0.5));
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index ca7d6e62362..75f29d733bd 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -5758,6 +5758,7 @@ void Tree::set_self_modulate(const Color &p_self_modulate) {
RS::get_singleton()->canvas_item_set_self_modulate(content_ci, p_self_modulate);
RS::get_singleton()->canvas_item_set_self_modulate(custom_ci, p_self_modulate);
RS::get_singleton()->canvas_item_set_self_modulate(stylebox_ci, p_self_modulate);
+ RS::get_singleton()->canvas_item_set_self_modulate(drop_indicator_ci, p_self_modulate);
}
void Tree::_update_all() {