Skip to content

Commit

Permalink
Fix previous min size affects _get_contents_minimum_size in AcceptDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Rindbee committed Jun 17, 2022
1 parent 2a92176 commit 53bd72f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions scene/main/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,31 +111,19 @@ Size2i Window::get_real_size() const {

void Window::set_max_size(const Size2i &p_max_size) {
max_size = p_max_size;
if (window_id != DisplayServer::INVALID_WINDOW_ID) {
DisplayServer::get_singleton()->window_set_max_size(max_size, window_id);
}
_update_window_size();
}

Size2i Window::get_max_size() const {
if (window_id != DisplayServer::INVALID_WINDOW_ID) {
max_size = DisplayServer::get_singleton()->window_get_max_size(window_id);
}
return max_size;
}

void Window::set_min_size(const Size2i &p_min_size) {
min_size = p_min_size;
if (!wrap_controls && window_id != DisplayServer::INVALID_WINDOW_ID) {
DisplayServer::get_singleton()->window_set_min_size(min_size, window_id);
}
_update_window_size();
}

Size2i Window::get_min_size() const {
if (window_id != DisplayServer::INVALID_WINDOW_ID) {
min_size = DisplayServer::get_singleton()->window_get_min_size(window_id);
}
return min_size;
}

Expand Down Expand Up @@ -621,6 +609,7 @@ void Window::_update_window_size() {
} else if (window_id != DisplayServer::INVALID_WINDOW_ID) {
DisplayServer::get_singleton()->window_set_size(size, window_id);
DisplayServer::get_singleton()->window_set_min_size(size_limit, window_id);
DisplayServer::get_singleton()->window_set_max_size(max_size, window_id);
}

//update the viewport
Expand Down

0 comments on commit 53bd72f

Please sign in to comment.