You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Fix tree line editor corners
This commit is contained in:
@@ -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);
|
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.
|
// EditorValidationPanel.
|
||||||
p_theme->set_stylebox(SceneStringName(panel), "EditorValidationPanel", p_config.tree_panel_style);
|
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")));
|
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.
|
// EditorValidationPanel.
|
||||||
Ref<StyleBoxFlat> editor_validation_panel = p_config.base_style->duplicate();
|
Ref<StyleBoxFlat> editor_validation_panel = p_config.base_style->duplicate();
|
||||||
editor_validation_panel->set_bg_color(p_config.surface_low_color);
|
editor_validation_panel->set_bg_color(p_config.surface_low_color);
|
||||||
|
|||||||
@@ -6889,6 +6889,7 @@ Tree::Tree() {
|
|||||||
popup_editor->add_child(popup_editor_vb);
|
popup_editor->add_child(popup_editor_vb);
|
||||||
|
|
||||||
line_editor = memnew(LineEdit);
|
line_editor = memnew(LineEdit);
|
||||||
|
line_editor->set_theme_type_variation("TreeLineEdit");
|
||||||
line_editor->set_v_size_flags(SIZE_EXPAND_FILL);
|
line_editor->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||||
line_editor->hide();
|
line_editor->hide();
|
||||||
popup_editor_vb->add_child(line_editor);
|
popup_editor_vb->add_child(line_editor);
|
||||||
|
|||||||
Reference in New Issue
Block a user