Skip to content

Commit

Permalink
Merge pull request #85828 from bruvzg/win_title_upd2
Browse files Browse the repository at this point in the history
Limit window size updates on title translation change.
  • Loading branch information
akien-mga committed Dec 6, 2023
2 parents cb570b2 + f9c42d9 commit 2f73a05
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scene/main/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,13 @@ void Window::_notification(int p_what) {

if (!embedder && window_id != DisplayServer::INVALID_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;

Expand Down

0 comments on commit 2f73a05

Please sign in to comment.