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 the Text2d text anchor's incorrect horizontal alignment #8019

Merged
merged 4 commits into from
Mar 10, 2023

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Mar 10, 2023

Objective

The Text2dBundle::text_anchor is incorrectly inverted on the X-axis.

text2d_wrong

Fixes: #8011

Solution

Reverse the x-axis on the text anchor translation.

text2d_correct

Changelog

  • Fixed Text2d text anchor point being wrongly inverted on the X axis.
  • Added use of text_anchor to the Text2d example.

Migration Guide

Text2d::text_anchor was incorrectly inverted on the X-axis. This has been fixed, existing code needs to swap:

  • Anchor::BottomLeft and Anchor::BottomRight
  • Anchor::CenterLeft and Anchor::CenterRight
  • Anchor::TopLeft and Anchor::TopRight

* Fixed `Text2d` text anchor point being wrongly inverted on the Y axis.
* Added use of `text_anchor` to the `Text2d` example.
* Fixed `Text2d` text anchor point being wrongly inverted on the X axis.
* Added use of `text_anchor` to the `Text2d` example.
@ickshonpe ickshonpe changed the title Fi Fix the Text2d text anchor's incorrect horizontal alignment Mar 10, 2023
@james7132 james7132 added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets labels Mar 10, 2023
@james7132 james7132 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 10, 2023
@james7132 james7132 added this to the 0.10.1 milestone Mar 10, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 10, 2023
@alice-i-cecile alice-i-cecile removed this pull request from the merge queue due to a manual request Mar 10, 2023
@alice-i-cecile
Copy link
Member

The changelog and objective / solution don't match: are we dealing with the x or y axis here?

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 10, 2023
@ickshonpe
Copy link
Contributor Author

The changelog and objective / solution don't match: are we dealing with the x or y axis here?

Sorry, X-axis is correct.

Merged via the queue into bevyengine:main with commit 7294588 Mar 10, 2023
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Mar 10, 2023
Shfty pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
Shfty pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text2dBundle::text_anchor is inverted on one axis
5 participants