From: Steve Smith Date: Wed, 11 Sep 2013 21:25:42 +0000 (-0400) Subject: Fix view autoresizing. X-Git-Tag: v0.4.7~1^2~4 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=aabba3c641974d35dd1144a92adde2d544949940;p=electron.git Fix view autoresizing. --- diff --git a/browser/native_window_mac.mm b/browser/native_window_mac.mm index 8cc2dcc2..c66a30d1 100644 --- a/browser/native_window_mac.mm +++ b/browser/native_window_mac.mm @@ -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];