diff options
| author | Rémi Verschelde | 2017-08-17 22:41:55 +0200 |
|---|---|---|
| committer | GitHub | 2017-08-17 22:41:55 +0200 |
| commit | ee59e627ded8c9d0a3d2d33b2d6cc6734a62b04d (patch) | |
| tree | 7c70f0dad8e79e273d9bcaadd0ff07a0c189b299 /scene/gui/tab_container.cpp | |
| parent | 33c1d25517050470689924c60414feaf295ce05f (diff) | |
| parent | c72529baf09927b381e7850a0f132c1473b16ee2 (diff) | |
| download | godot-ee59e627ded8c9d0a3d2d33b2d6cc6734a62b04d.tar.gz godot-ee59e627ded8c9d0a3d2d33b2d6cc6734a62b04d.tar.zst godot-ee59e627ded8c9d0a3d2d33b2d6cc6734a62b04d.zip | |
Diffstat (limited to 'scene/gui/tab_container.cpp')
| -rw-r--r-- | scene/gui/tab_container.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 1352569f3..520de951d 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -231,7 +231,7 @@ void TabContainer::_notification(int p_what) { // Draw the tab contents. Control *control = tabs[i + first_tab_cache]->cast_to<Control>(); - String text = control->has_meta("_tab_name") ? String(XL_MESSAGE(String(control->get_meta("_tab_name")))) : String(control->get_name()); + String text = control->has_meta("_tab_name") ? String(localize(String(control->get_meta("_tab_name")))) : String(control->get_name()); int x_content = tab_rect.position.x + tab_style->get_margin(MARGIN_LEFT); int top_margin = tab_style->get_margin(MARGIN_TOP); @@ -299,7 +299,7 @@ int TabContainer::_get_tab_width(int p_index) const { // Get the width of the text displayed on the tab. Ref<Font> font = get_font("font"); - String text = control->has_meta("_tab_name") ? String(XL_MESSAGE(String(control->get_meta("_tab_name")))) : String(control->get_name()); + String text = control->has_meta("_tab_name") ? String(localize(String(control->get_meta("_tab_name")))) : String(control->get_name()); int width = font->get_string_size(text).width; // Add space for a tab icon. |
