]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix view autoresizing.
authorSteve Smith <steve@orderedlist.com>
Wed, 11 Sep 2013 21:25:42 +0000 (17:25 -0400)
committerSteve Smith <steve@orderedlist.com>
Wed, 11 Sep 2013 21:25:42 +0000 (17:25 -0400)
browser/native_window_mac.mm

index 8cc2dcc236dc81685de856713131367dd227f966..c66a30d11eb2038f595bffc13e78a81c1671cb18 100644 (file)
@@ -115,9 +115,6 @@ static CGFloat const AtomWindowCornerRadius = 5.0;
 
   [[NSColor blackColor] set];
   [shadowPath fill];
-
-  [[NSColor colorWithCalibratedRed: 0.0 green: 0.0 blue: 0.0 alpha:0.7] set];
-  [shadowPath stroke];
   [shadowPath addClip];
 }
 @end
@@ -505,10 +502,12 @@ void NativeWindowMac::InstallView() {
     [[window() contentView] addSubview:view];
   } else {
     NSView* frameView = [[window() contentView] superview];
-    [view setFrame:[frameView bounds]];
 
     AtomFramelessView * shadowView = [[AtomFramelessView alloc] initWithFrame: [frameView bounds]];
+    [shadowView setAutoresizesSubviews:YES];
+    [shadowView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
 
+    [view setFrame:[shadowView bounds]];
     [frameView addSubview:shadowView];
     [shadowView addSubview:view];