1
0
Fork 0

Merge pull request #114231 from passivestar/tree-line-edit

Fix tree line editor corners
This commit is contained in:
Rémi Verschelde 2025-12-21 10:41:44 +01:00
commit 764de6fecc
No known key found for this signature in database
GPG Key ID: C3336907360768E1
3 changed files with 27 additions and 0 deletions

View File

@ -2009,6 +2009,19 @@ void ThemeClassic::populate_editor_styles(const Ref<EditorTheme> &p_theme, Edito
p_theme->set_stylebox(SceneStringName(panel), "TabContainerOdd", style_content_panel_odd);
}
// TreeLineEdit.
{
Ref<StyleBoxFlat> tree_line_edit_style = p_theme->get_stylebox(CoreStringName(normal), SNAME("LineEdit"))->duplicate();
tree_line_edit_style->set_corner_radius_all(0);
Ref<StyleBoxFlat> 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);

View File

@ -1989,6 +1989,19 @@ void ThemeModern::populate_editor_styles(const Ref<EditorTheme> &p_theme, Editor
p_theme->set_stylebox("tabbar_background", "TabContainerOdd", p_theme->get_stylebox(SNAME("tabbar_background"), SNAME("TabContainer")));
}
// TreeLineEdit.
{
Ref<StyleBoxFlat> tree_line_edit_style = p_theme->get_stylebox(CoreStringName(normal), SNAME("LineEdit"))->duplicate();
tree_line_edit_style->set_corner_radius_all(0);
Ref<StyleBoxFlat> 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<StyleBoxFlat> editor_validation_panel = p_config.base_style->duplicate();
editor_validation_panel->set_bg_color(p_config.surface_low_color);

View File

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