diff --git a/brightray/browser/mac/bry_inspectable_web_contents_view.h b/brightray/browser/mac/bry_inspectable_web_contents_view.h index 87abc98c3549..49eff626321d 100644 --- a/brightray/browser/mac/bry_inspectable_web_contents_view.h +++ b/brightray/browser/mac/bry_inspectable_web_contents_view.h @@ -2,7 +2,8 @@ @class BRYInspectableWebContentsViewPrivate; -@interface BRYInspectableWebContentsView : NSView { +@interface BRYInspectableWebContentsView + : NSView { @private BRYInspectableWebContentsViewPrivate *_private; } diff --git a/brightray/browser/mac/bry_inspectable_web_contents_view.mm b/brightray/browser/mac/bry_inspectable_web_contents_view.mm index 813d4fb67324..f193f7ef7650 100644 --- a/brightray/browser/mac/bry_inspectable_web_contents_view.mm +++ b/brightray/browser/mac/bry_inspectable_web_contents_view.mm @@ -10,10 +10,21 @@ using namespace brightray; +@interface GraySplitView : NSSplitView +- (NSColor*)dividerColor; +@end + +@implementation GraySplitView +- (NSColor*)dividerColor { + return [NSColor darkGrayColor]; +} +@end + + @interface BRYInspectableWebContentsViewPrivate : NSObject { @public InspectableWebContentsViewMac *inspectableWebContentsView; - NSSplitView *splitView; + GraySplitView *splitView; NSWindow *window; BOOL visible; } @@ -45,7 +56,8 @@ void SetActive(content::WebContents* web_contents, bool active) { _private = [[BRYInspectableWebContentsViewPrivate alloc] init]; _private->inspectableWebContentsView = inspectableWebContentsView; - _private->splitView = [[NSSplitView alloc] init]; + _private->splitView = [[GraySplitView alloc] init]; + _private->splitView.delegate = self; [self addSubview:_private->splitView]; _private->splitView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable; @@ -207,6 +219,12 @@ void SetActive(content::WebContents* web_contents, bool active) { [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(windowDidResignKey:) name:NSWindowDidResignKeyNotification object:newWindow]; } +#pragma mark - NSSplitViewDelegate + +-(void)splitViewWillResizeSubviews:(NSNotification *)notification { + [[_private->splitView window] disableScreenUpdatesUntilFlush]; +} + #pragma mark - NSWindowDelegate - (BOOL)windowShouldClose:(id)sender {