-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] - Update layout/style when scale factor changes too #4689
Conversation
crates/bevy_text/src/text2d.rs
Outdated
if let Ok((text, bounds, mut calculated_size)) = query.get_mut(entity) { | ||
let text_bounds = match bounds { | ||
for (entity, text_changed, text, maybe_bounds, mut calculated_size) in text_query.iter_mut() { | ||
if factor_changed || text_changed || queue.entities.remove(&entity) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
queue.entities.remove
might look expensive, but the other changes more than drown out this overhead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. besides that struct used for the local.
I can't test if this works as my distro does not support different scaling per monitor or updating the scaling without restarting :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat. I like the comment you added.
Although I find the line break a bit awkward, but I won't block on that.
Co-authored-by: devil ira <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the example of the linked issue and this solution worked as expected.
bors r+ |
# Objective - Fix #4688 ## Solution - Fixes #4688 - This raises an interesting question about our change detection system - is filtered queries actually a good UX for this? They're ergonomic in the easy case, but what do we recommend when it's not so. - In this case, the system should have been migrated similary to #4180 anyway, so I've done that.
Build failed (retrying...): |
# Objective - Fix #4688 ## Solution - Fixes #4688 - This raises an interesting question about our change detection system - is filtered queries actually a good UX for this? They're ergonomic in the easy case, but what do we recommend when it's not so. - In this case, the system should have been migrated similary to #4180 anyway, so I've done that.
# Objective - Fix bevyengine#4688 ## Solution - Fixes bevyengine#4688 - This raises an interesting question about our change detection system - is filtered queries actually a good UX for this? They're ergonomic in the easy case, but what do we recommend when it's not so. - In this case, the system should have been migrated similary to bevyengine#4180 anyway, so I've done that.
# Objective - Fix bevyengine#4688 ## Solution - Fixes bevyengine#4688 - This raises an interesting question about our change detection system - is filtered queries actually a good UX for this? They're ergonomic in the easy case, but what do we recommend when it's not so. - In this case, the system should have been migrated similary to bevyengine#4180 anyway, so I've done that.
# Objective - Fix bevyengine#4688 ## Solution - Fixes bevyengine#4688 - This raises an interesting question about our change detection system - is filtered queries actually a good UX for this? They're ergonomic in the easy case, but what do we recommend when it's not so. - In this case, the system should have been migrated similary to bevyengine#4180 anyway, so I've done that.
Objective
Solution