Commit 034259aa authored by David Fuhrmann's avatar David Fuhrmann

macosx: Remove VLCColor view, draw video view in black

Video view is drawn black in case first frame is not shown
instantly. NSWindow background color cannot be used anymore, as
it draws the title bar in a grey tone as well, which is not
desired.
parent 28352794
......@@ -71,8 +71,6 @@
BOOL b_podcastView_displayed;
VLCColorView * o_color_backdrop;
NSRect frameBeforePlayback;
}
- (void)makeSplitViewVisible;
......@@ -250,10 +248,6 @@ static const float f_min_window_height = 307.;
[self setHasShadow:YES];
self.previousSavedFrame = [self frame];
o_color_backdrop = [[VLCColorView alloc] initWithFrame:_splitView.frame];
[[self contentView] addSubview:o_color_backdrop positioned:NSWindowBelow relativeTo:_splitView];
[o_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
} else {
[_playlistScrollView setBorderType:NSNoBorder];
[_sidebarScrollView setBorderType:NSNoBorder];
......@@ -1256,9 +1250,6 @@ static const float f_min_window_height = 307.;
@end
@interface VLCDetachedVideoWindow ()
{
VLCColorView * o_color_backdrop;
}
@end
@implementation VLCDetachedVideoWindow
......@@ -1281,15 +1272,6 @@ static const float f_min_window_height = 307.;
[self setTitle: _NS("VLC media player")];
} else {
[self setBackgroundColor: [NSColor blackColor]];
}
if (darkInterface) {
o_color_backdrop = [[VLCColorView alloc] initWithFrame: [self.videoView frame]];
[[self contentView] addSubview: o_color_backdrop positioned: NSWindowBelow relativeTo: self.videoView];
[o_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
[self setContentMinSize: NSMakeSize(363., f_min_video_height + [[self controlsBar] height] + [self.titlebarView frame].size.height)];
} else {
[self setContentMinSize: NSMakeSize(363., f_min_video_height + [[self controlsBar] height])];
......
......@@ -59,10 +59,6 @@
@end
@interface VLCColorView : NSView
@end
@interface VLCCustomWindowButtonPrototype : NSButton
- (NSArray*)extendedAccessibilityAttributeNames: (NSArray*)theAttributeNames;
......
......@@ -364,22 +364,6 @@
@end
/*****************************************************************************
* VLCColorView
*
* since we are using a clear window color when using the black window
* style, some filling is needed behind the video and some other elements
*****************************************************************************/
@implementation VLCColorView
- (void)drawRect:(NSRect)rect {
[[NSColor blackColor] setFill];
NSRectFill(rect);
}
@end
/*****************************************************************************
* custom window buttons to support the accessibility stuff
*****************************************************************************/
......
......@@ -84,6 +84,13 @@
return self;
}
- (void)drawRect:(NSRect)rect
{
// Draw black area in case first frame is not drawn yet
[[NSColor blackColor] setFill];
NSRectFill(rect);
}
- (void)addVoutLayer:(CALayer *)aLayer
{
if (self.layer == nil) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment