Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aligning a Label "Center" or "Right" does not account for leading or trailing spaces #39630

Closed
aaronfranke opened this issue Jun 17, 2020 · 1 comment · Fixed by #40649
Closed
Milestone

Comments

@aaronfranke
Copy link
Member

aaronfranke commented Jun 17, 2020

Godot version: Occurs in 3.2 and master

OS/device including version: Ubuntu 20.04

Issue description: Aligning a Label "center" or "right" does not account for leading or trailing spaces. This was the cause of a long troubleshooting session on Discord. In the MRP posted, there are 3 nodes that show incorrect behavior.

  • Label1 has leading spaces and is set to align right, and its text is pushed outside of the box by the spaces because the alignment setting does not account for the leading spaces.

  • Label2 is a copy of Label1 except that there is a letter added in front of the spaces, which causes them to be counted and the text displays properly.

  • Label3 has trailing spaces and is set to align center. The text is in the middle, since it does not account for the spaces, but the text should actually be pushed to the left.

Steps to reproduce: Open the MRP, click on the boxes, observe that the behavior is wrong in many ways.

Minimal reproduction project: labels-are-broken.zip

@kyleguarco
Copy link

I am so happy you mentioned this... I was just looking over a similar issue I failed to fix with LineEdit. The issue is still present in 3.2.2rc1.

See issue #34951.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants