Skip to content

Commit 2f73a05

Browse files
committed
Merge pull request godotengine#85828 from bruvzg/win_title_upd2
Limit window size updates on title translation change.
2 parents cb570b2 + f9c42d9 commit 2f73a05

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scene/main/window.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,13 @@ void Window::_notification(int p_what) {
13011301

13021302
if (!embedder && window_id != DisplayServer::INVALID_WINDOW_ID) {
13031303
DisplayServer::get_singleton()->window_set_title(tr_title, window_id);
1304-
_update_window_size();
1304+
if (keep_title_visible) {
1305+
Size2i title_size = DisplayServer::get_singleton()->window_get_title_size(tr_title, window_id);
1306+
Size2i size_limit = get_clamped_minimum_size();
1307+
if (title_size.x > size_limit.x || title_size.y > size_limit.y) {
1308+
_update_window_size();
1309+
}
1310+
}
13051311
}
13061312
} break;
13071313

0 commit comments

Comments
 (0)