summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorCrystal Melting Dot <stresspassing@gmail.com>2021-03-04 22:10:28 +0300
committerCrystal Melting Dot <stresspassing@gmail.com>2021-03-04 22:10:28 +0300
commit89baf02fb60b649a96bc49d19252be39808e3ba1 (patch)
tree1a446bb26714ba2c7f4d437e2ebec74ac2290fe1 /scene
parent4c10d31bc42f0d01d1b6a8042413a8886d19f987 (diff)
Fix TabContainer _get_tab_width
Now it translates node name before calculating tab width
Diffstat (limited to 'scene')
-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 e3e3f549de..fe36dcb27b 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.