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

[Merged by Bors] - Text2d doesn't recompute text on changes to the text's bounds #7846

Closed

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Feb 28, 2023

Objective

Text2d entity's text needs to be recomputed when their bounds are changed, but it isn't.

Solution

Change update_text2d_layout to query for Ref<Text2dBounds> and recompute the text if the bounds have changed.

* Changed `update_text2d_layout` to query for `Ref<Text2dBounds>` and recompute the text if the bounds have changed.
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets labels Feb 28, 2023
@alice-i-cecile alice-i-cecile 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 Feb 28, 2023
@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Feb 28, 2023
# Objective

Text2d entity's text needs to be recomputed when their bounds are changed, but it isn't.

# Solution
Change `update_text2d_layout` to query for `Ref<Text2dBounds>` and recompute the text if the bounds have changed.
@bors bors bot changed the title Text2d doesn't recompute text on changes to the text's bounds [Merged by Bors] - Text2d doesn't recompute text on changes to the text's bounds Feb 28, 2023
@bors bors bot closed this Feb 28, 2023
Shfty pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
…gine#7846)

# Objective

Text2d entity's text needs to be recomputed when their bounds are changed, but it isn't.

# Solution
Change `update_text2d_layout` to query for `Ref<Text2dBounds>` and recompute the text if the bounds have changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen 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.

None yet

3 participants