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 autoSizeThatFits wrong calculations #221

Merged
merged 1 commit into from
Dec 17, 2020

Conversation

IgorBulyga
Copy link

@IgorBulyga IgorBulyga commented Dec 10, 2020

As I described in #220, there is a problem with size calculations of inner views while using autoSizeThatFits. To make it works correctly we need just update autoSizingRect of each views before layout starts.

There is example from ticket with this fix. As you can see it works as it should.

Fixed example

autoSizeThatFits

@antoinelamy Please check this fix.

Thank you.

Copy link
Member

@lucdion lucdion left a comment

Choose a reason for hiding this comment

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

Wow, thank you for this Nice fix

@lucdion
Copy link
Member

lucdion commented Dec 10, 2020

@antoinelamy, would you mind checking this change? 🙏

@antoinelamy
Copy link
Contributor

Yes I was looking at this bug and came with a similar solution as well but wanted to take more time to ensure it was not causing any other side effect. Will try to take the time soon.

@lucdion
Copy link
Member

lucdion commented Dec 17, 2020

@antoinelamy what is the risk of accepting this PR? From my point of view, it looks like a legit fix. What do you think could cause issues?
Thanks

@antoinelamy
Copy link
Contributor

@antoinelamy what is the risk of accepting this PR? From my point of view, it looks like a legit fix. What do you think could cause issues?
Thanks

I investigated this last weekend and it look fine, we can merge this. Thanks @IgorBulyga for figuring this out.

Copy link
Contributor

@antoinelamy antoinelamy left a comment

Choose a reason for hiding this comment

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

👍

@lucdion
Copy link
Member

lucdion commented Dec 17, 2020

Thanks @IgorBulyga @antoinelamy

@lucdion lucdion merged commit a908791 into layoutBox:master Dec 17, 2020
@IgorBulyga IgorBulyga deleted the bugfix/autoSizeThatFits branch December 18, 2020 13:10
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