Merge pull request #67215 from Nidjo123/project-dialog-resize
Resize project dialog only when necessary
This commit is contained in:
commit
3229194dfc
2 changed files with 6 additions and 2 deletions
|
@ -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() {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue