fix bug with computing the case where we should constrain via height

This commit is contained in:
Michael S. Barthelemy 2015-07-17 10:25:30 -04:00
parent d0c6176640
commit 6656afd57f

View file

@ -114,8 +114,8 @@ static const CGFloat kAtomWindowCornerRadius = 4.0;
newSize.height = roundf(((newSize.width - extraWidthPlusFrame) / interiorContentAspectRatio) + extraHeightPlusFrame);
}
else {
newSize.width = roundf(((newSize.height - extraHeightPlusFrame) * interiorContentAspectRatio) + extraWidthPlusFrame);
newSize.height = roundf(((frameSize.width - extraWidthPlusFrame) / interiorContentAspectRatio) + extraHeightPlusFrame);
newSize.width = roundf(((newSize.height - extraHeightPlusFrame) * interiorContentAspectRatio) + extraWidthPlusFrame);
}
}