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

Make UIViewBox use the same patterns as ViewBox #2400

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

swankjesse
Copy link
Collaborator

We now include the margin when measuring on 'Stretch' alignment. This was causing a layout bug previously.

We now use sizeThatFits exclusively, rather than using sizeThatFits when measuring and systemLayoutSizeFittingSize during layout.

We now include the margin when measuring on 'Stretch'
alignment. This was causing a layout bug previously.

We now use sizeThatFits exclusively, rather than using
sizeThatFits when measuring and systemLayoutSizeFittingSize
during layout.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug fix!

is Height -> with(Density.Default) {
height = maxOf(height, childModifier.height.toPx())
}
if (!mustMeasureWidth && !mustMeasureHeight) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android doesn’t have this optimization. It might benefit from it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(It’s more difficult because on Android measuring may have essential side-effects)

@swankjesse swankjesse merged commit 2f23df9 into trunk Oct 23, 2024
11 checks passed
@swankjesse swankjesse deleted the jwilson.1023.box_ios branch October 23, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants