summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2017-03-07 03:16:29 +0100
committerAkemi <der.richter@gmx.de>2017-03-09 18:02:36 +0100
commit076116a0e5f00232f1b8dad2ab76926667b63adf (patch)
treeab4505faa55afdc56db58d47df0b7b484542bb48
parentca1dd7cc6127d0ca1a02ed1ac1b77a0d0e9004e1 (diff)
downloadmpv-076116a0e5f00232f1b8dad2ab76926667b63adf.tar.bz2
mpv-076116a0e5f00232f1b8dad2ab76926667b63adf.tar.xz
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.
-rw-r--r--video/out/cocoa/video_view.m2
-rw-r--r--video/out/cocoa/window.m2
2 files changed, 3 insertions, 1 deletions
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];