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

fix: Fix TextBoxComponent alignment bug #2781

Merged
merged 2 commits into from
Sep 30, 2023
Merged

fix: Fix TextBoxComponent alignment bug #2781

merged 2 commits into from
Sep 30, 2023

Conversation

luanpotter
Copy link
Member

@luanpotter luanpotter commented Sep 30, 2023

Description

Fix TextBoxComponent alignment bug
The anchor is the anchor of the text box component itself.
It has nothing to do with the alignment of the text within the box.
The position computed for rendering the text on the above lines is assuming topLeft anchor for the text.

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

@luanpotter luanpotter marked this pull request as ready for review September 30, 2023 17:35
@@ -163,9 +163,10 @@ void main() {
_FramedTextBox(
text: 'That shows thee a weak slave; for the weakest goes to the '
'wall.',
position: Vector2(410, 320),
position: Vector2(410, 320) + Vector2(380, 270),
Copy link
Member Author

Choose a reason for hiding this comment

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

confirmed this would have broken on current main

@luanpotter luanpotter merged commit 0fb53ef into main Sep 30, 2023
8 checks passed
@luanpotter luanpotter deleted the luan.fix-tbc-bug branch September 30, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants