summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-03-17 21:05:20 +0100
committerGitHub <noreply@github.com>2021-03-17 21:05:20 +0100
commit888051889ed0b63a6b88d3a7e0c2bfbbacde7b4b (patch)
treeb2c3bc81459fbdbada09863a59beb6c9f8ced210
parente57f6e2cca90d4c9e956fe1a7ddb3ca086521b42 (diff)
parent89baf02fb60b649a96bc49d19252be39808e3ba1 (diff)
Merge pull request #46674 from cmd410/fix-tab-container
Fix TabContainer _get_tab_width for localized node names
-rw-r--r--scene/gui/tab_container.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 9d5871ef02..3bf163f670 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -645,7 +645,7 @@ int TabContainer::_get_tab_width(int p_index) const {
// Get the width of the text displayed on the tab.
Ref<Font> font = get_theme_font("font");
int font_size = get_theme_font_size("font_size");
- String text = control->has_meta("_tab_name") ? String(tr(String(control->get_meta("_tab_name")))) : String(control->get_name());
+ String text = control->has_meta("_tab_name") ? String(tr(String(control->get_meta("_tab_name")))) : String(tr(control->get_name()));
int width = font->get_string_size(text, font_size).width;
// Add space for a tab icon.