1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 01:22:30 +00:00

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.
This commit is contained in:
Akemi 2017-03-07 03:16:29 +01:00
parent ca1dd7cc61
commit 076116a0e5
2 changed files with 3 additions and 1 deletions

View File

@ -45,6 +45,8 @@
- (void)drawRect:(NSRect)rect
{
[[NSColor blackColor] setFill];
NSRectFill(rect);
[self.adapter performAsyncResize:[self frameInPixels].size];
}
@end

View File

@ -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];