From: Michael S. Barthelemy Date: Fri, 17 Jul 2015 14:25:30 +0000 (-0400) Subject: fix bug with computing the case where we should constrain via height X-Git-Tag: v0.30.1~11^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=6656afd57f70a06a71107a92d4848ad6c6a98d98;p=electron.git fix bug with computing the case where we should constrain via height --- diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index de7e8ad7..f543aae1 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -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); } }