mirror of https://github.com/godotengine/godot
Fix tree line editor corners
This commit is contained in:
parent
551ce8d47f
commit
d5cf2a5e7f
|
|
@ -1990,6 +1990,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -1946,6 +1946,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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue