#import <vlc_input.h>
#import "misc.h"
#import "fspanel.h"
+#import "MainWindowTitle.h"
@interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate> {
IBOutlet id o_play_btn;
NSTimer *t_hide_mouse_timer;
+ VLCColorView * o_color_backdrop;
NSInteger i_originalLevel;
NSRect previousSavedFrame;
}
#import "open.h"
#import "controls.h" // TODO: remove me
#import "SideBarItem.h"
-#import "MainWindowTitle.h"
#import <vlc_playlist.h>
#import <vlc_aout_intf.h>
#import <vlc_url.h>
- (void)dealloc
{
+ if (b_dark_interface)
+ [o_color_backdrop release];
+
[[NSNotificationCenter defaultCenter] removeObserver: self];
config_PutInt( VLCIntf->p_libvlc, "volume", i_lastShownVolume );
[self saveFrameUsingName: [self frameAutosaveName]];
[o_video_view setFrame: winrect];
previousSavedFrame = winrect;
+ o_color_backdrop = [[VLCColorView alloc] initWithFrame: [o_split_view frame]];
+ [[self contentView] addSubview: o_color_backdrop positioned: NSWindowBelow relativeTo: o_split_view];
+ [o_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
+
[self display];
}
else
/*****************************************************************************
* MainWindowTitle.h: MacOS X interface module
*****************************************************************************
- * Copyright (C) 2011 Felix Paul Kühne
+ * Copyright (C) 2011-2012 Felix Paul Kühne
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
@interface VLCResizeControl : NSImageView
{
}
+@end
+@interface VLCColorView : NSView
+{
+}
@end
/*****************************************************************************
* MainWindowTitle.m: MacOS X interface module
*****************************************************************************
- * Copyright (C) 2011 Felix Paul Kühne
+ * Copyright (C) 2011-2012 Felix Paul Kühne
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
}
@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
if (OSX_LION)
[o_sprefs_win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
+ else
+ [o_intf_nativefullscreen_ckb setEnabled:NO];
#ifndef MAC_OS_X_VERSION_10_7
[o_intf_nativefullscreen_ckb setEnabled:NO];
#endif