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

[right] and [center] alignment in RichTextLabel keeps space before a line wrap #64738

Closed
CorentinBrule opened this issue Aug 22, 2022 · 4 comments · Fixed by #65073
Closed

[right] and [center] alignment in RichTextLabel keeps space before a line wrap #64738

CorentinBrule opened this issue Aug 22, 2022 · 4 comments · Fixed by #65073
Assignees
Milestone

Comments

@CorentinBrule
Copy link
Contributor

Godot version

v3.5.stable.official [991bb6a]

System information

Windows 11

Issue description

the [right] BBCode tag for right alignement in RichTextLabel does a bad behaviour. He keeps space before a line wrap instead of avoid space. He does the good thing in a line break.

Actual :
bad-right-align

expected :
good-right-align

Steps to reproduce

create a RichTextLabel, enable BBCode and write a text between [right] and [/right] of a length greater than the width of the RichTextLabel rect to cause line wraps.

Minimal reproduction project

gui_rich_text_bbcode.zip

@akien-mga
Copy link
Member

CC @bruvzg @timothyqiu

@Calinou Calinou added this to the 3.x milestone Aug 22, 2022
@bruvzg bruvzg self-assigned this Aug 23, 2022
@bruvzg
Copy link
Member

bruvzg commented Aug 23, 2022

The same is true for 4.0, seems like we need to trim edge spaces for the right alignment in the similar way we do for fill.

@CorentinBrule
Copy link
Contributor Author

if it helps: Label elements with Align property on Right has the right behaviour :)

@akien-mga akien-mga changed the title [right] alignment in RichTextLabel keeps space before a line wrap [right] and [center] alignment in RichTextLabel keeps space before a line wrap Aug 23, 2022
@akien-mga
Copy link
Member

This should also be trimmed for [center], see #64779 for a MRP (CC @rokasv).

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

Successfully merging a pull request may close this issue.

4 participants