Commit acc84739 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed rounded bottom corners when using the black window style

parent 61e145ca
...@@ -187,6 +187,8 @@ EXTRA_DIST += \ ...@@ -187,6 +187,8 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow/back.png \ extras/package/macosx/Resources/mainwindow/back.png \
extras/package/macosx/Resources/mainwindow/bottom-background.png \ extras/package/macosx/Resources/mainwindow/bottom-background.png \
extras/package/macosx/Resources/mainwindow/bottombar-mini.png \ extras/package/macosx/Resources/mainwindow/bottombar-mini.png \
extras/package/macosx/Resources/mainwindow_dark/bottomdark-left.png \
extras/package/macosx/Resources/mainwindow_dark/bottomdark-right.png \
extras/package/macosx/Resources/mainwindow/dropzone-background.png \ extras/package/macosx/Resources/mainwindow/dropzone-background.png \
extras/package/macosx/Resources/mainwindow/dropzone.png \ extras/package/macosx/Resources/mainwindow/dropzone.png \
extras/package/macosx/Resources/mainwindow/effects-double-buttons-blue.png \ extras/package/macosx/Resources/mainwindow/effects-double-buttons-blue.png \
......
...@@ -21,16 +21,16 @@ ...@@ -21,16 +21,16 @@
</object> </object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool> <bool key="EncodedWithXMLCoder">YES</bool>
<integer value="21"/>
<integer value="4895"/> <integer value="4895"/>
<integer value="1617"/> <integer value="915"/>
<integer value="283"/> <integer value="283"/>
<integer value="4756"/>
<integer value="4596"/>
<integer value="29"/> <integer value="29"/>
<integer value="915"/> <integer value="1617"/>
<integer value="2770"/> <integer value="2770"/>
<integer value="2730"/>
<integer value="4722"/> <integer value="4722"/>
<integer value="2730"/>
<integer value="4596"/>
</object> </object>
<object class="NSArray" key="IBDocument.PluginDependencies"> <object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool> <bool key="EncodedWithXMLCoder">YES</bool>
...@@ -1143,7 +1143,7 @@ ...@@ -1143,7 +1143,7 @@
<reference key="NSSuperview" ref="429932428"/> <reference key="NSSuperview" ref="429932428"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int> <int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSViewCanDrawConcurrently">YES</bool> <bool key="NSViewCanDrawConcurrently">YES</bool>
<string key="NSClassName">VLBrushedMetalImageView</string> <string key="NSClassName">VLCThreePartDropView</string>
</object> </object>
</object> </object>
<string key="NSFrameSize">{604, 310}</string> <string key="NSFrameSize">{604, 310}</string>
...@@ -14802,6 +14802,52 @@ LCAuLi4</string> ...@@ -14802,6 +14802,52 @@ LCAuLi4</string>
<reference key="sourceIdentifier" ref="925772039"/> <reference key="sourceIdentifier" ref="925772039"/>
</object> </object>
</object> </object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">ITSlider</string>
<string key="superclassName">NSSlider</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="386911354">
<string key="majorKey">IBDocumentRelativeSource</string>
<string key="minorKey">../../../../../modules/gui/macosx/misc.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">TimeLineSlider</string>
<string key="superclassName">NSSlider</string>
<reference key="sourceIdentifier" ref="386911354"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLBrushedMetalImageView</string>
<string key="superclassName">NSImageView</string>
<reference key="sourceIdentifier" ref="386911354"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLCControllerView</string>
<string key="superclassName">NSView</string>
<reference key="sourceIdentifier" ref="386911354"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLCMainWindowSplitView</string>
<string key="superclassName">NSSplitView</string>
<reference key="sourceIdentifier" ref="386911354"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLCThreePartDropView</string>
<string key="superclassName">VLCThreePartImageView</string>
<reference key="sourceIdentifier" ref="386911354"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLCThreePartImageView</string>
<string key="superclassName">NSView</string>
<reference key="sourceIdentifier" ref="386911354"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLCTimeField</string>
<string key="superclassName">NSTextField</string>
<reference key="sourceIdentifier" ref="386911354"/>
</object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+"> <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool> <bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription"> <object class="IBPartialClassDescription">
......
...@@ -156,6 +156,8 @@ ...@@ -156,6 +156,8 @@
CC0586BD14ACF7C000659A99 /* sidebar-pictures.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0586B714ACF7C000659A99 /* sidebar-pictures.png */; }; CC0586BD14ACF7C000659A99 /* sidebar-pictures.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0586B714ACF7C000659A99 /* sidebar-pictures.png */; };
CC0586BE14ACF7C000659A99 /* sidebar-playlist.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0586B814ACF7C000659A99 /* sidebar-playlist.png */; }; CC0586BE14ACF7C000659A99 /* sidebar-playlist.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0586B814ACF7C000659A99 /* sidebar-playlist.png */; };
CC0586BF14ACF7C000659A99 /* sidebar-podcast.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0586B914ACF7C000659A99 /* sidebar-podcast.png */; }; CC0586BF14ACF7C000659A99 /* sidebar-podcast.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0586B914ACF7C000659A99 /* sidebar-podcast.png */; };
CC1655D314EEA1DE00FAA66F /* bottomdark-left.png in Resources */ = {isa = PBXBuildFile; fileRef = CC1655D114EEA1DE00FAA66F /* bottomdark-left.png */; };
CC1655D414EEA1DE00FAA66F /* bottomdark-right.png in Resources */ = {isa = PBXBuildFile; fileRef = CC1655D214EEA1DE00FAA66F /* bottomdark-right.png */; };
CC206B3814ACFEAC007935C6 /* lion-window-close-graphite.png in Resources */ = {isa = PBXBuildFile; fileRef = CC206B1314ACFEAC007935C6 /* lion-window-close-graphite.png */; }; CC206B3814ACFEAC007935C6 /* lion-window-close-graphite.png in Resources */ = {isa = PBXBuildFile; fileRef = CC206B1314ACFEAC007935C6 /* lion-window-close-graphite.png */; };
CC206B3914ACFEAC007935C6 /* lion-window-close-on-graphite.png in Resources */ = {isa = PBXBuildFile; fileRef = CC206B1414ACFEAC007935C6 /* lion-window-close-on-graphite.png */; }; CC206B3914ACFEAC007935C6 /* lion-window-close-on-graphite.png in Resources */ = {isa = PBXBuildFile; fileRef = CC206B1414ACFEAC007935C6 /* lion-window-close-on-graphite.png */; };
CC206B3A14ACFEAC007935C6 /* lion-window-close-on.png in Resources */ = {isa = PBXBuildFile; fileRef = CC206B1514ACFEAC007935C6 /* lion-window-close-on.png */; }; CC206B3A14ACFEAC007935C6 /* lion-window-close-on.png in Resources */ = {isa = PBXBuildFile; fileRef = CC206B1514ACFEAC007935C6 /* lion-window-close-on.png */; };
...@@ -473,6 +475,8 @@ ...@@ -473,6 +475,8 @@
CC0CD0E013DE0EAE00B0D90D /* PXSourceList.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PXSourceList.m; path = ../../../modules/gui/macosx/PXSourceList.m; sourceTree = "<group>"; }; CC0CD0E013DE0EAE00B0D90D /* PXSourceList.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = PXSourceList.m; path = ../../../modules/gui/macosx/PXSourceList.m; sourceTree = "<group>"; };
CC0CD0E113DE0EAE00B0D90D /* PXSourceListDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PXSourceListDataSource.h; path = ../../../modules/gui/macosx/PXSourceListDataSource.h; sourceTree = "<group>"; }; CC0CD0E113DE0EAE00B0D90D /* PXSourceListDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PXSourceListDataSource.h; path = ../../../modules/gui/macosx/PXSourceListDataSource.h; sourceTree = "<group>"; };
CC0CD0E213DE0EAE00B0D90D /* PXSourceListDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PXSourceListDelegate.h; path = ../../../modules/gui/macosx/PXSourceListDelegate.h; sourceTree = "<group>"; }; CC0CD0E213DE0EAE00B0D90D /* PXSourceListDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PXSourceListDelegate.h; path = ../../../modules/gui/macosx/PXSourceListDelegate.h; sourceTree = "<group>"; };
CC1655D114EEA1DE00FAA66F /* bottomdark-left.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bottomdark-left.png"; path = "Resources/mainwindow_dark/bottomdark-left.png"; sourceTree = "<group>"; };
CC1655D214EEA1DE00FAA66F /* bottomdark-right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bottomdark-right.png"; path = "Resources/mainwindow_dark/bottomdark-right.png"; sourceTree = "<group>"; };
CC1941240B9C1F8400635F6B /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; }; CC1941240B9C1F8400635F6B /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
CC1C41D00D9BAD7F002728FA /* noart.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = noart.png; path = Resources/noart.png; sourceTree = "<group>"; }; CC1C41D00D9BAD7F002728FA /* noart.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = noart.png; path = Resources/noart.png; sourceTree = "<group>"; };
CC206B1314ACFEAC007935C6 /* lion-window-close-graphite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lion-window-close-graphite.png"; sourceTree = "<group>"; }; CC206B1314ACFEAC007935C6 /* lion-window-close-graphite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lion-window-close-graphite.png"; sourceTree = "<group>"; };
...@@ -852,6 +856,8 @@ ...@@ -852,6 +856,8 @@
CC04321213B246DF00D7D52E /* back-pressed_dark.png */, CC04321213B246DF00D7D52E /* back-pressed_dark.png */,
CC9B43B013B29FCF000205AE /* bottom-background_dark.png */, CC9B43B013B29FCF000205AE /* bottom-background_dark.png */,
CC5800F61423A81500166912 /* bottombar-mini.png */, CC5800F61423A81500166912 /* bottombar-mini.png */,
CC1655D114EEA1DE00FAA66F /* bottomdark-left.png */,
CC1655D214EEA1DE00FAA66F /* bottomdark-right.png */,
CC04321313B246DF00D7D52E /* effects-double-buttons_dark.png */, CC04321313B246DF00D7D52E /* effects-double-buttons_dark.png */,
CC04321413B246DF00D7D52E /* effects-double-buttons-blue_dark.png */, CC04321413B246DF00D7D52E /* effects-double-buttons-blue_dark.png */,
CC04321513B246DF00D7D52E /* effects-double-buttons-pressed_dark.png */, CC04321513B246DF00D7D52E /* effects-double-buttons-pressed_dark.png */,
...@@ -1513,6 +1519,8 @@ ...@@ -1513,6 +1519,8 @@
CC206B6E14AD0A5D007935C6 /* window-fullscreen-on.png in Resources */, CC206B6E14AD0A5D007935C6 /* window-fullscreen-on.png in Resources */,
CC206B6F14AD0A5D007935C6 /* window-fullscreen-over.png in Resources */, CC206B6F14AD0A5D007935C6 /* window-fullscreen-over.png in Resources */,
CC206B7014AD0A5D007935C6 /* window-fullscreen.png in Resources */, CC206B7014AD0A5D007935C6 /* window-fullscreen.png in Resources */,
CC1655D314EEA1DE00FAA66F /* bottomdark-left.png in Resources */,
CC1655D414EEA1DE00FAA66F /* bottomdark-right.png in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
...@@ -149,7 +149,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -149,7 +149,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_dropzone_lbl setStringValue: _NS("Drop media here")]; [o_dropzone_lbl setStringValue: _NS("Drop media here")];
if (!b_dark_interface) { if (!b_dark_interface) {
[o_bottombar_view setImage: [NSImage imageNamed:@"bottom-background"]]; [o_bottombar_view setImagesLeft: [NSImage imageNamed:@"bottom-background"] middle: [NSImage imageNamed:@"bottom-background"] right: [NSImage imageNamed:@"bottom-background"]];
[o_bwd_btn setImage: [NSImage imageNamed:@"back"]]; [o_bwd_btn setImage: [NSImage imageNamed:@"back"]];
[o_bwd_btn setAlternateImage: [NSImage imageNamed:@"back-pressed"]]; [o_bwd_btn setAlternateImage: [NSImage imageNamed:@"back-pressed"]];
o_play_img = [[NSImage imageNamed:@"play"] retain]; o_play_img = [[NSImage imageNamed:@"play"] retain];
...@@ -192,7 +192,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -192,7 +192,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
} }
else else
{ {
[o_bottombar_view setImage: [NSImage imageNamed:@"bottom-background_dark"]]; [o_bottombar_view setImagesLeft: [NSImage imageNamed:@"bottomdark-left"] middle: [NSImage imageNamed:@"bottom-background_dark"] right: [NSImage imageNamed:@"bottomdark-right"]];
[o_bwd_btn setImage: [NSImage imageNamed:@"back_dark"]]; [o_bwd_btn setImage: [NSImage imageNamed:@"back_dark"]];
[o_bwd_btn setAlternateImage: [NSImage imageNamed:@"back-pressed_dark"]]; [o_bwd_btn setAlternateImage: [NSImage imageNamed:@"back-pressed_dark"]];
o_play_img = [[NSImage imageNamed:@"play_dark"] retain]; o_play_img = [[NSImage imageNamed:@"play_dark"] retain];
......
...@@ -185,3 +185,13 @@ ...@@ -185,3 +185,13 @@
- (void)setImagesLeft:(NSImage *)left middle: (NSImage *)middle right:(NSImage *)right; - (void)setImagesLeft:(NSImage *)left middle: (NSImage *)middle right:(NSImage *)right;
@end @end
/*****************************************************************************
* VLCThreePartImageView interface
*****************************************************************************/
@interface VLCThreePartDropView : VLCThreePartImageView
{
}
@end
...@@ -878,3 +878,99 @@ void _drawFrameInRect(NSRect frameRect) ...@@ -878,3 +878,99 @@ void _drawFrameInRect(NSRect frameRect)
} }
@end @end
@implementation VLCThreePartDropView
- (BOOL)mouseDownCanMoveWindow
{
return YES;
}
- (void)dealloc
{
[self unregisterDraggedTypes];
[super dealloc];
}
- (void)awakeFromNib
{
[self registerForDraggedTypes:[NSArray arrayWithObjects:NSTIFFPboardType,
NSFilenamesPboardType, nil]];
}
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
if ((NSDragOperationGeneric & [sender draggingSourceOperationMask])
== NSDragOperationGeneric)
{
return NSDragOperationGeneric;
}
else
{
return NSDragOperationNone;
}
}
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
{
return YES;
}
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPasteboard *o_paste = [sender draggingPasteboard];
NSArray *o_types = [NSArray arrayWithObjects: NSFilenamesPboardType, nil];
NSString *o_desired_type = [o_paste availableTypeFromArray:o_types];
NSData *o_carried_data = [o_paste dataForType:o_desired_type];
BOOL b_autoplay = config_GetInt( VLCIntf, "macosx-autoplay" );
if( o_carried_data )
{
if ([o_desired_type isEqualToString:NSFilenamesPboardType])
{
NSArray *o_array = [NSArray array];
NSArray *o_values = [[o_paste propertyListForType: NSFilenamesPboardType] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
NSUInteger count = [o_values count];
input_thread_t * p_input = pl_CurrentInput( VLCIntf );
BOOL b_returned = NO;
if (count == 1 && p_input)
{
b_returned = input_AddSubtitle( p_input, make_URI([[o_values objectAtIndex:0] UTF8String], NULL), true );
vlc_object_release( p_input );
if(!b_returned)
return YES;
}
else if( p_input )
vlc_object_release( p_input );
for( NSUInteger i = 0; i < count; i++)
{
NSDictionary *o_dic;
char *psz_uri = make_URI([[o_values objectAtIndex:i] UTF8String], NULL);
if( !psz_uri )
continue;
o_dic = [NSDictionary dictionaryWithObject:[NSString stringWithCString:psz_uri encoding:NSUTF8StringEncoding] forKey:@"ITEM_URL"];
free( psz_uri );
o_array = [o_array arrayByAddingObject: o_dic];
}
if( b_autoplay )
[[[VLCMain sharedInstance] playlist] appendArray: o_array atPos: -1 enqueue:NO];
else
[[[VLCMain sharedInstance] playlist] appendArray: o_array atPos: -1 enqueue:YES];
return YES;
}
}
[self setNeedsDisplay:YES];
return YES;
}
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender
{
[self setNeedsDisplay:YES];
}
@end
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