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

AspectRatio has incorrect intrinsic sizing #3666

Merged
merged 1 commit into from
May 2, 2016

Conversation

abarth
Copy link
Contributor

@abarth abarth commented May 2, 2016

If there's a max height or width, we should factor that into the intrinsic
sizing for the other dimension.

@abarth
Copy link
Contributor Author

abarth commented May 2, 2016

Still needs a test.

@@ -374,6 +374,8 @@ class RenderAspectRatio extends RenderProxyBox {
RenderBox child,
double aspectRatio
}) : _aspectRatio = aspectRatio, super(child) {
assert(newAspectRatio > 0.0);
Copy link
Contributor

Choose a reason for hiding this comment

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

these two need to be _aspectRatio

@abarth abarth force-pushed the intrinsic_aspect branch 5 times, most recently from 2375a92 to 3016321 Compare May 2, 2016 19:58
@abarth
Copy link
Contributor Author

abarth commented May 2, 2016

@Hixie

@@ -374,6 +374,8 @@ class RenderAspectRatio extends RenderProxyBox {
RenderBox child,
double aspectRatio
}) : _aspectRatio = aspectRatio, super(child) {
assert(_aspectRatio > 0.0);
assert(_aspectRatio < double.INFINITY);
Copy link
Contributor

Choose a reason for hiding this comment

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

_aspectRatio.isFinite is probably better

@Hixie
Copy link
Contributor

Hixie commented May 2, 2016

LGTM

If there's a max height or width, we should factor that into the intrinsic
sizing for the other dimension.
@abarth abarth merged commit 6072552 into flutter:master May 2, 2016
@abarth abarth deleted the intrinsic_aspect branch May 2, 2016 22:51
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants