]> khamidou — GitHub mirrors - electron.git/commitdiff
fix bug with computing the case where we should constrain via height
authorMichael S. Barthelemy <msb@idiom.com>
Fri, 17 Jul 2015 14:25:30 +0000 (10:25 -0400)
committerMichael S. Barthelemy <msb@idiom.com>
Fri, 17 Jul 2015 14:25:30 +0000 (10:25 -0400)
atom/browser/native_window_mac.mm

index de7e8ad779679992cafbb195797e51380f8a0ce6..f543aae1628dbdce177065a59b0fa7af47d310cf 100644 (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);
     }
   }