Skip to content

Conversation

@UkoeHB
Copy link
Contributor

@UkoeHB UkoeHB commented Jun 11, 2025

Objective

Solution

  • Apply aspect ratio multiple times to 'draw back' the image size if it leaks outside min/max bounds after the first aspect ratio application.

Testing

  • Updated the ui_scaling example to demonstrate.

@UkoeHB
Copy link
Contributor Author

UkoeHB commented Jun 11, 2025

@ickshonpe trying to get this to work, but ran into a deeper problem. Even if the ContentSize says one thing, if you have a fixed width or height then the actual node size may be different. And extract_uinode_images uses the node size, not the adjusted size.

I am at a loss.

@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 S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 11, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16.2 milestone Jun 11, 2025
@alice-i-cecile alice-i-cecile added S-Needs-Help The author needs help finishing this PR. and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 11, 2025
@ickshonpe ickshonpe self-requested a review June 30, 2025 21:45
@mockersf mockersf modified the milestones: 0.16.2, 0.17 Aug 18, 2025
@alice-i-cecile alice-i-cecile removed this from the 0.17 milestone Sep 2, 2025
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-Needs-Help The author needs help finishing this PR.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

ImageMeasure does not apply aspect_ratio to max width/height

3 participants