Merge pull request #40923 from opl-/fix/update-window-size

Fix window max_size acting as min_size
This commit is contained in:
Rémi Verschelde 2020-07-31 19:16:42 +02:00 committed by GitHub
commit 970ce06b34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -527,11 +527,11 @@ void Window::_update_window_size() {
size.x = MAX(size_limit.x, size.x);
size.y = MAX(size_limit.y, size.y);
if (max_size.x > 0 && max_size.x > min_size.x && max_size.x > size.x) {
if (max_size.x > 0 && max_size.x > min_size.x && size.x > max_size.x) {
size.x = max_size.x;
}
if (max_size.y > 0 && max_size.y > min_size.y && max_size.y > size.y) {
if (max_size.y > 0 && max_size.y > min_size.y && size.y > max_size.y) {
size.y = max_size.y;
}