godot icon indicating copy to clipboard operation
godot copied to clipboard

Translation keys on control nodes are very inconsistent

Open devvoid opened this issue 6 years ago • 2 comments

Godot version: 3.1.1 stable

OS/device including version: Linux Mint 19.2

Issue description: Putting translation keys on Controls is very inconsistent. Normally, nodes are supposed to shrink to fit the text, but all sorts of things break that and cause it to be large enough to fit the full translation key.

For example, the key ui_options_quit_without_saving has the text Quit Without Saving, which is obviously shorter. Immediately after creation it shrinks properly, but doing various different things seem to make it keep the full size of the key.

Steps to reproduce: Open the reproduction project. Run the game; the top-left button will fit the text, but the bottom-right won't. Moving the top-left button at all will make it stop working properly too.

Minimal reproduction project: GodotIssue.zip

devvoid avatar Sep 12 '19 23:09 devvoid

Still valid in 3.2.3 You can use containers to avoid this issue.

KoBeWi avatar Nov 15 '20 19:11 KoBeWi

This is not a bug, but a configuration error.

I made some adjustments to the margins properties and the labels shrink properly: test.zip

Basically, in order for a control to shrink properly, you have to make sure that the "Grow Direction" properties do their job. For example, the "Grow Direction" property of the label in the MRP is only used when the text grows wider. If you reset Margin Right to 0, then Grow Direction would always be on duty and the label would properly shrink.

timothyqiu avatar Oct 21 '24 12:10 timothyqiu