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

[RTL] Add support for vertical alignment. #97963

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Oct 8, 2024

Adds vertical_alignment property.

Closes godotengine/godot-proposals#6674

@bruvzg bruvzg added this to the 4.x milestone Oct 8, 2024
@bruvzg bruvzg requested review from a team as code owners October 8, 2024 07:00
@Calinou
Copy link
Member

Calinou commented Oct 11, 2024

Note that this PR doesn't implement godotengine/godot-proposals#4458, which asks for BBCode tags to control alignment on a per-paragraph basis. This may be too complex to implement though, and most use cases seem to only require a per-RichTextLabel property to control vertical alignment.

There could be a horizontal alignment property, so that you can center text without needing to always wrap it in [center]. BBCode tags would still be able to override it, so it'd act as a default for paragraphs that don't specify their alignment. This is likely better implemented in its own PR since it's technically independent.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally (including with different font sizes in the RichTextLabel), it works as expected.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Nov 29, 2024
@akien-mga akien-mga merged commit 5d74c53 into godotengine:master Nov 29, 2024
19 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Add vertical alignment option to RichTextLabel
4 participants