diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 5 | ||||
-rw-r--r-- | editor/project_manager.cpp | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 03ece6c29b..ab79031ad2 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6093,7 +6093,10 @@ EditorNode::EditorNode() { } // Define a minimum window size to prevent UI elements from overlapping or being cut off. - DisplayServer::get_singleton()->window_set_min_size(Size2(1024, 600) * EDSCALE); + Window *w = Object::cast_to<Window>(SceneTree::get_singleton()->get_root()); + if (w) { + w->set_min_size(Size2(1024, 600) * EDSCALE); + } FileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files")); EditorFileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files")); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index dc755cab41..b4ffc7d78d 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -3008,7 +3008,10 @@ ProjectManager::ProjectManager() { SceneTree::get_singleton()->get_root()->connect("files_dropped", callable_mp(this, &ProjectManager::_files_dropped)); // Define a minimum window size to prevent UI elements from overlapping or being cut off. - DisplayServer::get_singleton()->window_set_min_size(Size2(520, 350) * EDSCALE); + Window *w = Object::cast_to<Window>(SceneTree::get_singleton()->get_root()); + if (w) { + w->set_min_size(Size2(520, 350) * EDSCALE); + } // Resize the bootsplash window based on Editor display scale EDSCALE. float scale_factor = MAX(1, EDSCALE); |