summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/project_manager.cpp6
-rw-r--r--scene/main/window.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index c6fcdc890c..5a1eedd8a2 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -143,7 +143,11 @@ private:
install_status_rect->set_texture(new_icon);
}
- set_size(Size2(500, 0) * EDSCALE);
+ Size2i window_size = get_size();
+ Size2 contents_min_size = get_contents_minimum_size();
+ if (window_size.x < contents_min_size.x || window_size.y < contents_min_size.y) {
+ set_size(window_size.max(contents_min_size));
+ }
}
String _test_path() {
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 7fb3f32d36..9df8ed40e9 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -651,9 +651,9 @@ void Window::_update_window_size() {
DisplayServer::get_singleton()->window_set_min_size(Size2i(), window_id);
}
- DisplayServer::get_singleton()->window_set_size(size, window_id);
DisplayServer::get_singleton()->window_set_max_size(max_size_valid ? max_size : Size2i(), window_id);
DisplayServer::get_singleton()->window_set_min_size(size_limit, window_id);
+ DisplayServer::get_singleton()->window_set_size(size, window_id);
}
//update the viewport