1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-30 18:30:54 +00:00

Improve editor inspector main container spacing in modern theme

This commit is contained in:
passivestar
2025-12-20 15:15:14 +04:00
parent 551ce8d47f
commit 0c6285c0b9
3 changed files with 10 additions and 2 deletions

View File

@@ -3823,7 +3823,7 @@ void EditorInspector::_add_section_in_tree(EditorInspectorSection *p_section, VB
}
if (!container) {
container = memnew(VBoxContainer);
container->set_theme_type_variation(SNAME("EditorInspectorContainer"));
container->set_theme_type_variation(SNAME("EditorSectionContainer"));
p_current_vbox->add_child(container);
}
container->add_child(p_section);

View File

@@ -2014,6 +2014,10 @@ void ThemeClassic::populate_editor_styles(const Ref<EditorTheme> &p_theme, Edito
p_theme->set_type_variation("EditorInspectorContainer", "VBoxContainer");
p_theme->set_constant("separation", "EditorInspectorContainer", 0);
// Vertical separation between inspector sections.
p_theme->set_type_variation("EditorSectionContainer", "VBoxContainer");
p_theme->set_constant("separation", "EditorSectionContainer", 0);
// Vertical separation between inspector properties.
p_theme->set_type_variation("EditorPropertyContainer", "VBoxContainer");
p_theme->set_constant("separation", "EditorPropertyContainer", p_config.increased_margin * EDSCALE);

View File

@@ -1990,7 +1990,11 @@ void ThemeModern::populate_editor_styles(const Ref<EditorTheme> &p_theme, Editor
// Vertical separation between inspector areas.
p_theme->set_type_variation("EditorInspectorContainer", "VBoxContainer");
p_theme->set_constant("separation", "EditorInspectorContainer", Math::ceil(p_config.base_margin * 0.5 * EDSCALE));
p_theme->set_constant("separation", "EditorInspectorContainer", Math::ceil(p_config.base_margin * EDSCALE));
// Vertical separation between inspector sections.
p_theme->set_type_variation("EditorSectionContainer", "VBoxContainer");
p_theme->set_constant("separation", "EditorSectionContainer", p_config.base_margin * 0.5 * EDSCALE);
// Vertical separation between inspector properties.
p_theme->set_type_variation("EditorPropertyContainer", "VBoxContainer");