Fix window max_size acting as min_size

This commit is contained in:
opl- 2020-07-31 17:38:34 +02:00
parent 5d880bf7db
commit 48d55e46d0

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;
}