diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 188b01ff945..6383dc5aba7 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -736,6 +736,8 @@ void EditorNode::_notification(int p_what) { get_window()->set_theme(theme); gui_base->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("Background"), SNAME("EditorStyles"))); + main_vbox->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_MINSIZE, gui_base->get_theme_constant(SNAME("window_border_margin"), SNAME("Editor"))); + main_vbox->add_theme_constant_override("separation", gui_base->get_theme_constant(SNAME("top_bar_separation"), SNAME("Editor"))); scene_root_parent->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("Content"), SNAME("EditorStyles"))); bottom_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("BottomPanel"), SNAME("EditorStyles"))); tabbar_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("tabbar_background"), SNAME("TabContainer"))); @@ -7001,8 +7003,8 @@ EditorNode::EditorNode() { main_vbox = memnew(VBoxContainer); gui_base->add_child(main_vbox); - main_vbox->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_MINSIZE, 8); - main_vbox->add_theme_constant_override("separation", 8 * EDSCALE); + main_vbox->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_MINSIZE, gui_base->get_theme_constant(SNAME("window_border_margin"), SNAME("Editor"))); + main_vbox->add_theme_constant_override("separation", gui_base->get_theme_constant(SNAME("top_bar_separation"), SNAME("Editor"))); title_bar = memnew(EditorTitleBar); main_vbox->add_child(title_bar); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 190d06afb20..2ff53dd9f12 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -626,6 +626,8 @@ Ref create_editor_theme(const Ref p_theme) { theme->set_constant("dark_theme", "Editor", dark_theme); theme->set_constant("color_picker_button_height", "Editor", 28 * EDSCALE); theme->set_constant("gizmo_handle_scale", "Editor", gizmo_handle_scale); + theme->set_constant("window_border_margin", "Editor", 8); + theme->set_constant("top_bar_separation", "Editor", 8 * EDSCALE); // Register editor icons. // If the settings are comparable to the old theme, then just copy them over.