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

Fix game view window not updating title when translation changes

This commit is contained in:
Haoyu Qiu
2025-06-14 23:06:55 +08:00
parent 46c495ca21
commit 0a1fa10315
5 changed files with 52 additions and 67 deletions

View File

@@ -353,7 +353,7 @@ void Viewport::_sub_window_update(Window *p_window) {
const real_t title_space = r.size.width - panel->get_minimum_size().x - close_h_ofs;
if (title_space > 0) {
TextLine title_text = TextLine(p_window->get_translated_title(), title_font, font_size);
TextLine title_text = TextLine(p_window->get_displayed_title(), title_font, font_size);
title_text.set_width(title_space);
title_text.set_direction(p_window->is_layout_rtl() ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR);
int x = (r.size.width - title_text.get_size().x) / 2;