From 076116a0e5f00232f1b8dad2ab76926667b63adf Mon Sep 17 00:00:00 2001 From: Akemi Date: Tue, 7 Mar 2017 03:16:29 +0100 Subject: cocoa: set background of the title bar from black to white due to the see-through nature of the title bar and our standard black window background, the title bar appears dark grey opposed to the expected light grey. we change the window background to white but at the same time set the background of the enclosed view to black. that way the title bar has a white background and the background of our video stays black in all cases. this prevents white flashing in some cases when the video is resized with too heavy render settings. --- video/out/cocoa/video_view.m | 2 ++ video/out/cocoa/window.m | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/video/out/cocoa/video_view.m b/video/out/cocoa/video_view.m index cb09dc8b9f..45c21cdc9c 100644 --- a/video/out/cocoa/video_view.m +++ b/video/out/cocoa/video_view.m @@ -45,6 +45,8 @@ - (void)drawRect:(NSRect)rect { + [[NSColor blackColor] setFill]; + NSRectFill(rect); [self.adapter performAsyncResize:[self frameInPixels].size]; } @end diff --git a/video/out/cocoa/window.m b/video/out/cocoa/window.m index 89c9e61d6b..137ef530d9 100644 --- a/video/out/cocoa/window.m +++ b/video/out/cocoa/window.m @@ -57,7 +57,7 @@ backing:buffering_type defer:flag screen:screen]) { - [self setBackgroundColor:[NSColor blackColor]]; + [self setBackgroundColor:[NSColor whiteColor]]; [self setMinSize:NSMakeSize(50,50)]; [self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary]; -- cgit v1.2.3