1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Limit window size updates on title translation change.

This commit is contained in:
bruvzg
2023-12-06 10:51:27 +02:00
parent 7233bc6736
commit f9c42d9fff

View File

@@ -1301,7 +1301,13 @@ void Window::_notification(int p_what) {
if (!embedder && window_id != DisplayServer::INVALID_WINDOW_ID) { if (!embedder && window_id != DisplayServer::INVALID_WINDOW_ID) {
DisplayServer::get_singleton()->window_set_title(tr_title, window_id); DisplayServer::get_singleton()->window_set_title(tr_title, window_id);
_update_window_size(); if (keep_title_visible) {
Size2i title_size = DisplayServer::get_singleton()->window_get_title_size(tr_title, window_id);
Size2i size_limit = get_clamped_minimum_size();
if (title_size.x > size_limit.x || title_size.y > size_limit.y) {
_update_window_size();
}
}
} }
} break; } break;