Commit 30f4531b authored by Felix Paul Kühne's avatar Felix Paul Kühne

* centre fspanel in the lower third of the screen. additionally, switched...

* centre fspanel in the lower third of the screen. additionally, switched style mask to allow dragging in the entire window area (forward-porting [18092])
parent aa59948d
...@@ -42,13 +42,33 @@ ...@@ -42,13 +42,33 @@
backing:(NSBackingStoreType)bufferingType backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag defer:(BOOL)flag
{ {
id win=[super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:flag]; id win=[super initWithContentRect:contentRect styleMask:NSTexturedBackgroundWindowMask backing:bufferingType defer:flag];
[win setOpaque:NO]; [win setOpaque:NO];
[win setHasShadow: NO]; [win setHasShadow: NO];
[win setBackgroundColor:[NSColor clearColor]]; [win setBackgroundColor:[NSColor clearColor]];
/* let the window sit on top of everything else and start out completely transparent */ /* let the window sit on top of everything else and start out completely transparent */
[win setLevel:NSFloatingWindowLevel]; [win setLevel:NSFloatingWindowLevel];
[win setAlphaValue:0.0]; [win setAlphaValue:0.0];
/* centre the panel in the lower third of the screen */
NSPoint theCoordinate;
NSRect theScreensFrame;
NSRect theWindowsFrame;
int i_outputScreen;
i_outputScreen = var_GetInteger( VLCIntf, "video-device" );
if( i_outputScreen <=0 || i_outputScreen > (signed int)[[NSScreen screens] count] )
/* invalid preferences or none specified, using main screen */
theScreensFrame = [[NSScreen mainScreen] frame];
else
/* user-defined screen */
theScreensFrame = [[[NSScreen screens] objectAtIndex: i_outputScreen] frame];
theWindowsFrame = [win frame];
theCoordinate.x = (theScreensFrame.size.width - theWindowsFrame.size.width) / 2;
theCoordinate.y = (theScreensFrame.size.height / 3) - theWindowsFrame.size.height;
[win setFrameTopLeftPoint: theCoordinate];
return win; return win;
} }
......
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