diff --git a/editor/themes/theme_classic.cpp b/editor/themes/theme_classic.cpp index 77846a8638e..dc8f10af177 100644 --- a/editor/themes/theme_classic.cpp +++ b/editor/themes/theme_classic.cpp @@ -2009,6 +2009,19 @@ void ThemeClassic::populate_editor_styles(const Ref &p_theme, Edito p_theme->set_stylebox(SceneStringName(panel), "TabContainerOdd", style_content_panel_odd); } + // TreeLineEdit. + { + Ref tree_line_edit_style = p_theme->get_stylebox(CoreStringName(normal), SNAME("LineEdit"))->duplicate(); + tree_line_edit_style->set_corner_radius_all(0); + + Ref tree_line_edit_style_focus = p_theme->get_stylebox("focus", SNAME("LineEdit"))->duplicate(); + tree_line_edit_style_focus->set_corner_radius_all(0); + + p_theme->set_type_variation("TreeLineEdit", "LineEdit"); + p_theme->set_stylebox(CoreStringName(normal), "TreeLineEdit", tree_line_edit_style); + p_theme->set_stylebox("focus", "TreeLineEdit", tree_line_edit_style_focus); + } + // EditorValidationPanel. p_theme->set_stylebox(SceneStringName(panel), "EditorValidationPanel", p_config.tree_panel_style); diff --git a/editor/themes/theme_modern.cpp b/editor/themes/theme_modern.cpp index 0df90299c1d..8e8d6dc90f0 100644 --- a/editor/themes/theme_modern.cpp +++ b/editor/themes/theme_modern.cpp @@ -1989,6 +1989,19 @@ void ThemeModern::populate_editor_styles(const Ref &p_theme, Editor p_theme->set_stylebox("tabbar_background", "TabContainerOdd", p_theme->get_stylebox(SNAME("tabbar_background"), SNAME("TabContainer"))); } + // TreeLineEdit. + { + Ref tree_line_edit_style = p_theme->get_stylebox(CoreStringName(normal), SNAME("LineEdit"))->duplicate(); + tree_line_edit_style->set_corner_radius_all(0); + + Ref tree_line_edit_style_focus = p_theme->get_stylebox("focus", SNAME("LineEdit"))->duplicate(); + tree_line_edit_style_focus->set_corner_radius_all(0); + + p_theme->set_type_variation("TreeLineEdit", "LineEdit"); + p_theme->set_stylebox(CoreStringName(normal), "TreeLineEdit", tree_line_edit_style); + p_theme->set_stylebox("focus", "TreeLineEdit", tree_line_edit_style_focus); + } + // EditorValidationPanel. Ref editor_validation_panel = p_config.base_style->duplicate(); editor_validation_panel->set_bg_color(p_config.surface_low_color); diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 8386c446e31..a8db87aeb18 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -6889,6 +6889,7 @@ Tree::Tree() { popup_editor->add_child(popup_editor_vb); line_editor = memnew(LineEdit); + line_editor->set_theme_type_variation("TreeLineEdit"); line_editor->set_v_size_flags(SIZE_EXPAND_FILL); line_editor->hide(); popup_editor_vb->add_child(line_editor);