From 6656afd57f70a06a71107a92d4848ad6c6a98d98 Mon Sep 17 00:00:00 2001 From: "Michael S. Barthelemy" Date: Fri, 17 Jul 2015 10:25:30 -0400 Subject: [PATCH] fix bug with computing the case where we should constrain via height --- atom/browser/native_window_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } -- 2.43.0