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 update_image_content_size_system to use the camera target's scale factor #17614

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Jan 30, 2025

Objective

Update UI image node size on changes to its camera target's scale factor.

Fixes #17613

Solution

Query for the camera target and use its scale factor.

Also changes the size stored in ImageNodeSize to physical pixels. It's only used in change detection and by using physical coords we can avoid having to track scale factor separately.

Testing

If you run the example from #17613 you'll see that the image sizes are updated correctly now.

…camera target's scale factor, rather

Also changed the size stored in `ImageNodeSize` to physical pixels. It's only used in change detection and by using physical coords we can avoid having to track scale factor separately.
@ickshonpe ickshonpe changed the title Fixed update_image_content_size_system so that it uses the correct scale factor Fix update_image_content_size_system so that it uses the correct scale factor Jan 30, 2025
@ickshonpe ickshonpe changed the title Fix update_image_content_size_system so that it uses the correct scale factor Fix update_image_content_size_system to use its target's scale factor Jan 30, 2025
@ickshonpe ickshonpe changed the title Fix update_image_content_size_system to use its target's scale factor Fix update_image_content_size_system to use the camera target's scale factor Jan 30, 2025
@ickshonpe ickshonpe added A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 30, 2025
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-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI image size is only updated on changes to the primary window's scale factor
1 participant