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:
parent
ca1dd7cc61
commit
076116a0e5
@ -45,6 +45,8 @@
|
||||
|
||||
- (void)drawRect:(NSRect)rect
|
||||
{
|
||||
[[NSColor blackColor] setFill];
|
||||
NSRectFill(rect);
|
||||
[self.adapter performAsyncResize:[self frameInPixels].size];
|
||||
}
|
||||
@end
|
||||
|
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user