Commit 73e17bbc authored by Felix Paul Kühne's avatar Felix Paul Kühne Committed by Jean-Baptiste Kempf

macosx: added a basic traffic lights icon set for the dark window and the related implementation

(cherry picked from commit 6e77944124447121dd655340513c7e882b5432c1)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent d0510312
......@@ -279,6 +279,15 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow_dark/volume-low_dark.png \
extras/package/macosx/Resources/mainwindow_dark/volume-slider-knob_dark.png \
extras/package/macosx/Resources/mainwindow_dark/volume-slider-track_dark.png \
extras/package/macosx/Resources/mainwindow_dark/window-close-on.png \
extras/package/macosx/Resources/mainwindow_dark/window-close-over.png \
extras/package/macosx/Resources/mainwindow_dark/window-close.png \
extras/package/macosx/Resources/mainwindow_dark/window-minimize-on.png \
extras/package/macosx/Resources/mainwindow_dark/window-minimize-over.png \
extras/package/macosx/Resources/mainwindow_dark/window-minimize.png \
extras/package/macosx/Resources/mainwindow_dark/window-zoom-on.png \
extras/package/macosx/Resources/mainwindow_dark/window-zoom-over.png \
extras/package/macosx/Resources/mainwindow_dark/window-zoom.png \
extras/package/macosx/Resources/noart.png \
extras/package/macosx/Resources/prefs/spref_cone_Audio_64.png \
extras/package/macosx/Resources/prefs/spref_cone_Hotkeys_64.png \
......
......@@ -21,12 +21,12 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="4596"/>
<integer value="334"/>
<integer value="1617"/>
<integer value="4756"/>
<integer value="334"/>
<integer value="4596"/>
<integer value="4758"/>
<integer value="2730"/>
<integer value="2"/>
<integer value="915"/>
<integer value="4722"/>
</object>
......@@ -4016,6 +4016,7 @@ LCAuLi4</string>
</object>
<string key="NSFrame">{{1, 1}, {498, 102}}</string>
<reference key="NSSuperview" ref="563453281"/>
<reference key="NSNextKeyView" ref="550703508"/>
<reference key="NSDocView" ref="550703508"/>
<reference key="NSBGColor" ref="712893775"/>
<reference key="NSCursor" ref="1071817267"/>
......@@ -4044,6 +4045,7 @@ LCAuLi4</string>
</object>
<string key="NSFrame">{{92, 96}, {500, 104}}</string>
<reference key="NSSuperview" ref="366395044"/>
<reference key="NSNextKeyView" ref="1059447005"/>
<int key="NSsFlags">133650</int>
<reference key="NSVScroller" ref="444566474"/>
<reference key="NSHScroller" ref="599664251"/>
......@@ -4497,14 +4499,14 @@ LCAuLi4</string>
<string key="NSReuseIdentifierKey">_NS:610</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="883426607">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="841513812"/>
<string key="NSCellIdentifier">_NS:610</string>
<reference key="NSControlView" ref="912813065"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">134</int>
<int key="NSButtonFlags">-2046672641</int>
<int key="NSButtonFlags2">6</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
......@@ -4514,7 +4516,7 @@ LCAuLi4</string>
<object class="NSButton" id="47797873">
<reference key="NSNextResponder" ref="471121744"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{48, 4.93359375}, {12, 12}}</string>
<string key="NSFrame">{{48, 3.93359375}, {15, 14}}</string>
<reference key="NSSuperview" ref="471121744"/>
<string key="NSReuseIdentifierKey">_NS:610</string>
<bool key="NSEnabled">YES</bool>
......@@ -4525,8 +4527,8 @@ LCAuLi4</string>
<reference key="NSSupport" ref="841513812"/>
<string key="NSCellIdentifier">_NS:610</string>
<reference key="NSControlView" ref="47797873"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">134</int>
<int key="NSButtonFlags">-2046672641</int>
<int key="NSButtonFlags2">6</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
......@@ -4536,7 +4538,7 @@ LCAuLi4</string>
<object class="NSButton" id="145580725">
<reference key="NSNextResponder" ref="471121744"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{28, 5}, {12, 12}}</string>
<string key="NSFrame">{{28, 4}, {15, 14}}</string>
<reference key="NSSuperview" ref="471121744"/>
<string key="NSReuseIdentifierKey">_NS:610</string>
<bool key="NSEnabled">YES</bool>
......@@ -4547,8 +4549,8 @@ LCAuLi4</string>
<reference key="NSSupport" ref="841513812"/>
<string key="NSCellIdentifier">_NS:610</string>
<reference key="NSControlView" ref="145580725"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">134</int>
<int key="NSButtonFlags">-2046672641</int>
<int key="NSButtonFlags2">6</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
......@@ -4558,7 +4560,7 @@ LCAuLi4</string>
<object class="NSButton" id="369193052">
<reference key="NSNextResponder" ref="471121744"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{8, 5}, {12, 12}}</string>
<string key="NSFrame">{{8, 4}, {15, 14}}</string>
<reference key="NSSuperview" ref="471121744"/>
<string key="NSReuseIdentifierKey">_NS:610</string>
<bool key="NSEnabled">YES</bool>
......@@ -4569,8 +4571,8 @@ LCAuLi4</string>
<reference key="NSSupport" ref="841513812"/>
<string key="NSCellIdentifier">_NS:610</string>
<reference key="NSControlView" ref="369193052"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">134</int>
<int key="NSButtonFlags">-2046672641</int>
<int key="NSButtonFlags2">6</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
......@@ -10861,12 +10863,15 @@ LCAuLi4</string>
<string>4758.IBViewBoundsToFrameTransform</string>
<string>4759.IBPluginDependency</string>
<string>4759.IBViewBoundsToFrameTransform</string>
<string>4760.CustomClassName</string>
<string>4760.IBPluginDependency</string>
<string>4761.IBPluginDependency</string>
<string>4761.IBViewBoundsToFrameTransform</string>
<string>4762.CustomClassName</string>
<string>4762.IBPluginDependency</string>
<string>4763.IBPluginDependency</string>
<string>4763.IBViewBoundsToFrameTransform</string>
<string>4764.CustomClassName</string>
<string>4764.IBPluginDependency</string>
<string>4765.IBPluginDependency</string>
<string>4765.IBViewBoundsToFrameTransform</string>
......@@ -11110,9 +11115,9 @@ LCAuLi4</string>
<string>{{430, 565}, {137, 103}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>{{329, 301}, {604, 310}}</string>
<string>{{246, 101}, {604, 310}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{329, 301}, {604, 310}}</string>
<string>{{246, 101}, {604, 310}}</string>
<boolean value="YES"/>
<boolean value="NO"/>
<boolean value="YES"/>
......@@ -11699,16 +11704,19 @@ LCAuLi4</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBAAAAwXAAAA</bytes>
</object>
<string>VLCWindowButtonCell</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABB4AAAwXAAAA</bytes>
</object>
<string>VLCWindowButtonCell</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCQAAAwXAAAA</bytes>
</object>
<string>VLCWindowButtonCell</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
......@@ -16713,7 +16721,7 @@ LCAuLi4</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="444352063">
<string key="majorKey">IBDocumentRelativeSource</string>
<string key="minorKey">../../../../../modules/gui/macosx/MainWindowTitle.h</string>
</object>
......@@ -16731,6 +16739,11 @@ LCAuLi4</string>
<string key="minorKey">../../../../../modules/gui/macosx/misc.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLCWindowButtonCell</string>
<string key="superclassName">NSButtonCell</string>
<reference key="sourceIdentifier" ref="444352063"/>
</object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
......
......@@ -150,6 +150,15 @@
CC0433D213B28C8C00D7D52E /* spref_cone_Interface_64.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0433CC13B28C8C00D7D52E /* spref_cone_Interface_64.png */; };
CC0433D313B28C8C00D7D52E /* spref_cone_Subtitles_64.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0433CD13B28C8C00D7D52E /* spref_cone_Subtitles_64.png */; };
CC0433D413B28C8C00D7D52E /* spref_cone_Video_64.png in Resources */ = {isa = PBXBuildFile; fileRef = CC0433CE13B28C8C00D7D52E /* spref_cone_Video_64.png */; };
CC2DB09A14A7550D0050A055 /* window-close-on.png in Resources */ = {isa = PBXBuildFile; fileRef = CC2DB09114A7550D0050A055 /* window-close-on.png */; };
CC2DB09B14A7550D0050A055 /* window-close-over.png in Resources */ = {isa = PBXBuildFile; fileRef = CC2DB09214A7550D0050A055 /* window-close-over.png */; };
CC2DB09C14A7550D0050A055 /* window-close.png in Resources */ = {isa = PBXBuildFile; fileRef = CC2DB09314A7550D0050A055 /* window-close.png */; };
CC2DB09D14A7550D0050A055 /* window-minimize-on.png in Resources */ = {isa = PBXBuildFile; fileRef = CC2DB09414A7550D0050A055 /* window-minimize-on.png */; };
CC2DB09E14A7550D0050A055 /* window-minimize-over.png in Resources */ = {isa = PBXBuildFile; fileRef = CC2DB09514A7550D0050A055 /* window-minimize-over.png */; };
CC2DB09F14A7550D0050A055 /* window-minimize.png in Resources */ = {isa = PBXBuildFile; fileRef = CC2DB09614A7550D0050A055 /* window-minimize.png */; };
CC2DB0A014A7550D0050A055 /* window-zoom-on.png in Resources */ = {isa = PBXBuildFile; fileRef = CC2DB09714A7550D0050A055 /* window-zoom-on.png */; };
CC2DB0A114A7550D0050A055 /* window-zoom-over.png in Resources */ = {isa = PBXBuildFile; fileRef = CC2DB09814A7550D0050A055 /* window-zoom-over.png */; };
CC2DB0A214A7550D0050A055 /* window-zoom.png in Resources */ = {isa = PBXBuildFile; fileRef = CC2DB09914A7550D0050A055 /* window-zoom.png */; };
CC3F9F861350B2A000B0E885 /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC3F9F851350B2A000B0E885 /* Growl.framework */; };
CC402EB80E00ABBB006A4BA4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F69B0CA602E24F6401A80112 /* InfoPlist.strings */; };
CC402EB90E00ABBB006A4BA4 /* vlc.scriptSuite in Resources */ = {isa = PBXBuildFile; fileRef = 8EBF3FA303F13FFB0059A3A7 /* vlc.scriptSuite */; };
......@@ -420,6 +429,15 @@
CC0CD0E213DE0EAE00B0D90D /* PXSourceListDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PXSourceListDelegate.h; path = ../../../modules/gui/macosx/PXSourceListDelegate.h; sourceTree = "<group>"; };
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>"; };
CC2DB09114A7550D0050A055 /* window-close-on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-on.png"; path = "Resources/mainwindow_dark/window-close-on.png"; sourceTree = "<group>"; };
CC2DB09214A7550D0050A055 /* window-close-over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close-over.png"; path = "Resources/mainwindow_dark/window-close-over.png"; sourceTree = "<group>"; };
CC2DB09314A7550D0050A055 /* window-close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-close.png"; path = "Resources/mainwindow_dark/window-close.png"; sourceTree = "<group>"; };
CC2DB09414A7550D0050A055 /* window-minimize-on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-minimize-on.png"; path = "Resources/mainwindow_dark/window-minimize-on.png"; sourceTree = "<group>"; };
CC2DB09514A7550D0050A055 /* window-minimize-over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-minimize-over.png"; path = "Resources/mainwindow_dark/window-minimize-over.png"; sourceTree = "<group>"; };
CC2DB09614A7550D0050A055 /* window-minimize.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-minimize.png"; path = "Resources/mainwindow_dark/window-minimize.png"; sourceTree = "<group>"; };
CC2DB09714A7550D0050A055 /* window-zoom-on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-zoom-on.png"; path = "Resources/mainwindow_dark/window-zoom-on.png"; sourceTree = "<group>"; };
CC2DB09814A7550D0050A055 /* window-zoom-over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-zoom-over.png"; path = "Resources/mainwindow_dark/window-zoom-over.png"; sourceTree = "<group>"; };
CC2DB09914A7550D0050A055 /* window-zoom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-zoom.png"; path = "Resources/mainwindow_dark/window-zoom.png"; sourceTree = "<group>"; };
CC3DC89B0A7CDB9600B53F32 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
CC3F9F851350B2A000B0E885 /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = ../../../contrib/Growl.framework; sourceTree = "<absolute>"; };
CC402F4B0E00ABBB006A4BA4 /* VLC.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VLC.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -793,6 +811,15 @@
CC04323813B246DF00D7D52E /* volume-low_dark.png */,
CC04323913B246DF00D7D52E /* volume-slider-knob_dark.png */,
CC04323A13B246DF00D7D52E /* volume-slider-track_dark.png */,
CC2DB09114A7550D0050A055 /* window-close-on.png */,
CC2DB09214A7550D0050A055 /* window-close-over.png */,
CC2DB09314A7550D0050A055 /* window-close.png */,
CC2DB09414A7550D0050A055 /* window-minimize-on.png */,
CC2DB09514A7550D0050A055 /* window-minimize-over.png */,
CC2DB09614A7550D0050A055 /* window-minimize.png */,
CC2DB09714A7550D0050A055 /* window-zoom-on.png */,
CC2DB09814A7550D0050A055 /* window-zoom-over.png */,
CC2DB09914A7550D0050A055 /* window-zoom.png */,
);
name = "dark variant";
sourceTree = "<group>";
......@@ -1304,6 +1331,15 @@
CCC4A92914A40340006731E4 /* pictures.png in Resources */,
CCC4A92A14A40340006731E4 /* playlist.png in Resources */,
CCC4A92B14A40340006731E4 /* podcast.png in Resources */,
CC2DB09A14A7550D0050A055 /* window-close-on.png in Resources */,
CC2DB09B14A7550D0050A055 /* window-close-over.png in Resources */,
CC2DB09C14A7550D0050A055 /* window-close.png in Resources */,
CC2DB09D14A7550D0050A055 /* window-minimize-on.png in Resources */,
CC2DB09E14A7550D0050A055 /* window-minimize-over.png in Resources */,
CC2DB09F14A7550D0050A055 /* window-minimize.png in Resources */,
CC2DB0A014A7550D0050A055 /* window-zoom-on.png in Resources */,
CC2DB0A114A7550D0050A055 /* window-zoom-over.png in Resources */,
CC2DB0A214A7550D0050A055 /* window-zoom.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -39,5 +39,11 @@
- (IBAction)buttonAction:(id)sender;
- (void)setWindowTitle:(NSString *)title;
- (void)setFullscreenButtonHidden:(BOOL)b_value;
- (void)setWindowButtonOver:(BOOL)b_value;
@end
@interface VLCWindowButtonCell : NSButtonCell
{
}
@end
......@@ -40,7 +40,15 @@
[self setImage: [NSImage imageNamed:@"bottom-background_dark"]];
[self setAutoresizesSubviews: YES];
/* TODO: icon setters */
[o_red_btn setImage: [NSImage imageNamed:@"window-close"]];
[o_red_btn setAlternateImage: [NSImage imageNamed:@"window-close-on"]];
[[o_red_btn cell] setShowsBorderOnlyWhileMouseInside: YES];
[o_yellow_btn setImage: [NSImage imageNamed:@"window-minimize"]];
[o_yellow_btn setAlternateImage: [NSImage imageNamed:@"window-minimize-on"]];
[[o_yellow_btn cell] setShowsBorderOnlyWhileMouseInside: YES];
[o_green_btn setImage: [NSImage imageNamed:@"window-zoom"]];
[o_green_btn setAlternateImage: [NSImage imageNamed:@"window-zoom-on"]];
[[o_green_btn cell] setShowsBorderOnlyWhileMouseInside: YES];
}
- (BOOL)mouseDownCanMoveWindow
......@@ -72,4 +80,34 @@
[o_fullscreen_btn setHidden: b_value];
}
- (void)setWindowButtonOver:(BOOL)b_value
{
if( b_value )
{
[o_red_btn setImage: [NSImage imageNamed:@"window-close-over"]];
[o_yellow_btn setImage: [NSImage imageNamed:@"window-minimize-over"]];
[o_green_btn setImage: [NSImage imageNamed:@"window-zoom-over"]];
}
else
{
[o_red_btn setImage: [NSImage imageNamed:@"window-close"]];
[o_yellow_btn setImage: [NSImage imageNamed:@"window-minimize"]];
[o_green_btn setImage: [NSImage imageNamed:@"window-zoom"]];
}
}
@end
@implementation VLCWindowButtonCell
- (void)mouseEntered:(NSEvent *)theEvent
{
[(VLCMainWindowTitleView *)[[self controlView] superview] setWindowButtonOver: YES];
}
- (void)mouseExited:(NSEvent *)theEvent
{
[(VLCMainWindowTitleView *)[[self controlView] superview] setWindowButtonOver: NO];
}
@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