]> git.sesse.net Git - vlc/commitdiff
macosx: added placeholder artwork for the title bar's fullscreen button
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 25 Dec 2011 16:54:21 +0000 (17:54 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 25 Dec 2011 16:54:21 +0000 (17:54 +0100)
Makefile.am
extras/package/macosx/Resources/English.lproj/MainMenu.xib
extras/package/macosx/Resources/mainwindow_dark/window-fullscreen-on.png [new file with mode: 0644]
extras/package/macosx/Resources/mainwindow_dark/window-fullscreen-over.png [new file with mode: 0644]
extras/package/macosx/Resources/mainwindow_dark/window-fullscreen.png [new file with mode: 0644]
extras/package/macosx/vlc.xcodeproj/project.pbxproj
modules/gui/macosx/MainWindowTitle.h
modules/gui/macosx/MainWindowTitle.m

index c3e9008efec98afe17b8fe76d98cc843e76bae88..0dc04122e389833134eac308eec329bd32367077 100644 (file)
@@ -282,6 +282,9 @@ EXTRA_DIST += \
        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-fullscreen-on.png \
+       extras/package/macosx/Resources/mainwindow_dark/window-fullscreen-over.png \
+       extras/package/macosx/Resources/mainwindow_dark/window-fullscreen.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 \
index 359d5e4d7955ff17aaf0b789591c3203b4c251b3..5fa0f6bcdaf1f43298576bab308182abd20205e4 100644 (file)
     </object>
     <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
       <bool key="EncodedWithXMLCoder">YES</bool>
-      <integer value="1617"/>
-      <integer value="4756"/>
-      <integer value="334"/>
+      <integer value="4722"/>
       <integer value="4596"/>
-      <integer value="4758"/>
+      <integer value="334"/>
       <integer value="2730"/>
       <integer value="915"/>
-      <integer value="4722"/>
+      <integer value="1617"/>
+      <integer value="4756"/>
+      <integer value="4758"/>
     </object>
     <object class="NSArray" key="IBDocument.PluginDependencies">
       <bool key="EncodedWithXMLCoder">YES</bool>
@@ -4469,7 +4469,7 @@ LCAuLi4</string>
           <object class="NSTextField" id="659976200">
             <reference key="NSNextResponder" ref="471121744"/>
             <int key="NSvFlags">266</int>
-            <string key="NSFrame">{{65, 3}, {270, 17}}</string>
+            <string key="NSFrame">{{65, 3}, {263, 17}}</string>
             <reference key="NSSuperview" ref="471121744"/>
             <string key="NSReuseIdentifierKey">_NS:4068</string>
             <bool key="NSEnabled">YES</bool>
@@ -4494,18 +4494,18 @@ LCAuLi4</string>
           <object class="NSButton" id="912813065">
             <reference key="NSNextResponder" ref="471121744"/>
             <int key="NSvFlags">265</int>
-            <string key="NSFrame">{{382, 4}, {14, 14}}</string>
+            <string key="NSFrame">{{383, 4}, {14, 14}}</string>
             <reference key="NSSuperview" ref="471121744"/>
             <string key="NSReuseIdentifierKey">_NS:610</string>
             <bool key="NSEnabled">YES</bool>
             <object class="NSButtonCell" key="NSCell" id="883426607">
-              <int key="NSCellFlags">67239424</int>
+              <int key="NSCellFlags">-2080244224</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">-2046672641</int>
+              <int key="NSButtonFlags">134365439</int>
               <int key="NSButtonFlags2">6</int>
               <string key="NSAlternateContents"/>
               <string key="NSKeyEquivalent"/>
@@ -4516,18 +4516,18 @@ LCAuLi4</string>
           <object class="NSButton" id="47797873">
             <reference key="NSNextResponder" ref="471121744"/>
             <int key="NSvFlags">268</int>
-            <string key="NSFrame">{{48, 3.93359375}, {15, 14}}</string>
+            <string key="NSFrame">{{48, 4}, {15, 14}}</string>
             <reference key="NSSuperview" ref="471121744"/>
             <string key="NSReuseIdentifierKey">_NS:610</string>
             <bool key="NSEnabled">YES</bool>
             <object class="NSButtonCell" key="NSCell" id="576041215">
-              <int key="NSCellFlags">67239424</int>
+              <int key="NSCellFlags">-2080244224</int>
               <int key="NSCellFlags2">134217728</int>
               <string key="NSContents"/>
               <reference key="NSSupport" ref="841513812"/>
               <string key="NSCellIdentifier">_NS:610</string>
               <reference key="NSControlView" ref="47797873"/>
-              <int key="NSButtonFlags">-2046672641</int>
+              <int key="NSButtonFlags">134365439</int>
               <int key="NSButtonFlags2">6</int>
               <string key="NSAlternateContents"/>
               <string key="NSKeyEquivalent"/>
@@ -4549,7 +4549,7 @@ LCAuLi4</string>
               <reference key="NSSupport" ref="841513812"/>
               <string key="NSCellIdentifier">_NS:610</string>
               <reference key="NSControlView" ref="145580725"/>
-              <int key="NSButtonFlags">-2046672641</int>
+              <int key="NSButtonFlags">134365439</int>
               <int key="NSButtonFlags2">6</int>
               <string key="NSAlternateContents"/>
               <string key="NSKeyEquivalent"/>
@@ -4571,7 +4571,7 @@ LCAuLi4</string>
               <reference key="NSSupport" ref="841513812"/>
               <string key="NSCellIdentifier">_NS:610</string>
               <reference key="NSControlView" ref="369193052"/>
-              <int key="NSButtonFlags">-2046672641</int>
+              <int key="NSButtonFlags">134365439</int>
               <int key="NSButtonFlags2">6</int>
               <string key="NSAlternateContents"/>
               <string key="NSKeyEquivalent"/>
@@ -10875,6 +10875,7 @@ LCAuLi4</string>
           <string>4764.IBPluginDependency</string>
           <string>4765.IBPluginDependency</string>
           <string>4765.IBViewBoundsToFrameTransform</string>
+          <string>4766.CustomClassName</string>
           <string>4766.IBPluginDependency</string>
           <string>4777.IBPluginDependency</string>
           <string>4778.IBPluginDependency</string>
@@ -11115,9 +11116,9 @@ LCAuLi4</string>
           <string>{{430, 565}, {137, 103}}</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <boolean value="YES"/>
-          <string>{{246, 101}, {604, 310}}</string>
+          <string>{{329, 101}, {604, 310}}</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-          <string>{{246, 101}, {604, 310}}</string>
+          <string>{{329, 101}, {604, 310}}</string>
           <boolean value="YES"/>
           <boolean value="NO"/>
           <boolean value="YES"/>
@@ -11722,6 +11723,7 @@ LCAuLi4</string>
           <object class="NSAffineTransform">
             <bytes key="NSTransformStruct">P4AAAL+AAABDvwAAwYAAAA</bytes>
           </object>
+          <string>VLCWindowButtonCell</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
diff --git a/extras/package/macosx/Resources/mainwindow_dark/window-fullscreen-on.png b/extras/package/macosx/Resources/mainwindow_dark/window-fullscreen-on.png
new file mode 100644 (file)
index 0000000..83ea28c
Binary files /dev/null and b/extras/package/macosx/Resources/mainwindow_dark/window-fullscreen-on.png differ
diff --git a/extras/package/macosx/Resources/mainwindow_dark/window-fullscreen-over.png b/extras/package/macosx/Resources/mainwindow_dark/window-fullscreen-over.png
new file mode 100644 (file)
index 0000000..0c3eebe
Binary files /dev/null and b/extras/package/macosx/Resources/mainwindow_dark/window-fullscreen-over.png differ
diff --git a/extras/package/macosx/Resources/mainwindow_dark/window-fullscreen.png b/extras/package/macosx/Resources/mainwindow_dark/window-fullscreen.png
new file mode 100644 (file)
index 0000000..0a84d4b
Binary files /dev/null and b/extras/package/macosx/Resources/mainwindow_dark/window-fullscreen.png differ
index 6cb1c97e8aee0cdf88b55f5bbd6a2ce15780a30a..493d7698a5a256e0f6f0047f8976612fe867c89b 100644 (file)
                CC58012C1423A85300166912 /* fs_volume_slider_bar@x1.5.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5801111423A85300166912 /* fs_volume_slider_bar@x1.5.png */; };
                CC58012D1423A85300166912 /* fs_volume_slider_knob_highlight@x1.5.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5801121423A85300166912 /* fs_volume_slider_knob_highlight@x1.5.png */; };
                CC58012E1423A85300166912 /* fs_volume_slider_knob@x1.5.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5801131423A85300166912 /* fs_volume_slider_knob@x1.5.png */; };
+               CC6FA91914A78AE700353C5F /* window-fullscreen-on.png in Resources */ = {isa = PBXBuildFile; fileRef = CC6FA91614A78AE700353C5F /* window-fullscreen-on.png */; };
+               CC6FA91A14A78AE700353C5F /* window-fullscreen-over.png in Resources */ = {isa = PBXBuildFile; fileRef = CC6FA91714A78AE700353C5F /* window-fullscreen-over.png */; };
+               CC6FA91B14A78AE700353C5F /* window-fullscreen.png in Resources */ = {isa = PBXBuildFile; fileRef = CC6FA91814A78AE700353C5F /* window-fullscreen.png */; };
                CC78DA4413DE056700E9603C /* topbar_background.png in Resources */ = {isa = PBXBuildFile; fileRef = CC78DA4313DE056700E9603C /* topbar_background.png */; };
                CC8062641021F8790021EB9A /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = CC8062631021F8790021EB9A /* dsa_pub.pem */; };
                CC84FB2D130083BB00816D38 /* BGHUDAppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC84FB2C130083BB00816D38 /* BGHUDAppKit.framework */; };
                CC6D8D9D0A878DED006F2BBE /* AppleRemote.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppleRemote.m; path = ../../../modules/gui/macosx/AppleRemote.m; sourceTree = SOURCE_ROOT; };
                CC6EDD4F0B9CA2140096068A /* eyetv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = eyetv.h; path = ../../../modules/gui/macosx/eyetv.h; sourceTree = SOURCE_ROOT; };
                CC6EDD500B9CA2140096068A /* eyetv.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = eyetv.m; path = ../../../modules/gui/macosx/eyetv.m; sourceTree = SOURCE_ROOT; };
+               CC6FA91614A78AE700353C5F /* window-fullscreen-on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-fullscreen-on.png"; path = "Resources/mainwindow_dark/window-fullscreen-on.png"; sourceTree = "<group>"; };
+               CC6FA91714A78AE700353C5F /* window-fullscreen-over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-fullscreen-over.png"; path = "Resources/mainwindow_dark/window-fullscreen-over.png"; sourceTree = "<group>"; };
+               CC6FA91814A78AE700353C5F /* window-fullscreen.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-fullscreen.png"; path = "Resources/mainwindow_dark/window-fullscreen.png"; sourceTree = "<group>"; };
                CC707EC3137464CD0003010A /* TrackSynchronization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TrackSynchronization.h; path = ../../../modules/gui/macosx/TrackSynchronization.h; sourceTree = "<group>"; };
                CC707EC4137464CD0003010A /* TrackSynchronization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TrackSynchronization.m; path = ../../../modules/gui/macosx/TrackSynchronization.m; sourceTree = "<group>"; };
                CC772DAC10E621C100675C9B /* VLCProgressPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCProgressPanel.h; path = ../../../modules/gui/macosx_dialog_provider/VLCProgressPanel.h; sourceTree = SOURCE_ROOT; };
                                CC2DB09114A7550D0050A055 /* window-close-on.png */,
                                CC2DB09214A7550D0050A055 /* window-close-over.png */,
                                CC2DB09314A7550D0050A055 /* window-close.png */,
+                               CC6FA91614A78AE700353C5F /* window-fullscreen-on.png */,
+                               CC6FA91714A78AE700353C5F /* window-fullscreen-over.png */,
+                               CC6FA91814A78AE700353C5F /* window-fullscreen.png */,
                                CC2DB09414A7550D0050A055 /* window-minimize-on.png */,
                                CC2DB09514A7550D0050A055 /* window-minimize-over.png */,
                                CC2DB09614A7550D0050A055 /* window-minimize.png */,
                                CC2DB0A014A7550D0050A055 /* window-zoom-on.png in Resources */,
                                CC2DB0A114A7550D0050A055 /* window-zoom-over.png in Resources */,
                                CC2DB0A214A7550D0050A055 /* window-zoom.png in Resources */,
+                               CC6FA91914A78AE700353C5F /* window-fullscreen-on.png in Resources */,
+                               CC6FA91A14A78AE700353C5F /* window-fullscreen-over.png in Resources */,
+                               CC6FA91B14A78AE700353C5F /* window-fullscreen.png in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 6720f10912493721dec15c93225b8d05ebb36a90..405ce429a6564619915a7cb3312e8ebbba09a6dc 100644 (file)
@@ -40,6 +40,7 @@
 - (void)setWindowTitle:(NSString *)title;
 - (void)setFullscreenButtonHidden:(BOOL)b_value;
 - (void)setWindowButtonOver:(BOOL)b_value;
+- (void)setWindowFullscreenButtonOver:(BOOL)b_value;
 
 @end
 
index 528cd736b705929fb9dc57ca9b8b81f29a69b06c..1b73cd7a884f9a82a4616337316f4158104d9b4f 100644 (file)
     [o_red_btn setImage: [NSImage imageNamed:@"window-close"]];
     [o_red_btn setAlternateImage: [NSImage imageNamed:@"window-close-on"]];
     [[o_red_btn cell] setShowsBorderOnlyWhileMouseInside: YES];
+    [[o_red_btn cell] setTag: 0];
     [o_yellow_btn setImage: [NSImage imageNamed:@"window-minimize"]];
     [o_yellow_btn setAlternateImage: [NSImage imageNamed:@"window-minimize-on"]];
     [[o_yellow_btn cell] setShowsBorderOnlyWhileMouseInside: YES];
+    [[o_yellow_btn cell] setTag: 1];
     [o_green_btn setImage: [NSImage imageNamed:@"window-zoom"]];
     [o_green_btn setAlternateImage: [NSImage imageNamed:@"window-zoom-on"]];
     [[o_green_btn cell] setShowsBorderOnlyWhileMouseInside: YES];
+    [[o_green_btn cell] setTag: 2];
+    [o_fullscreen_btn setImage: [NSImage imageNamed:@"window-fullscreen"]];
+    [o_fullscreen_btn setAlternateImage: [NSImage imageNamed:@"window-fullscreen-on"]];
+    [[o_fullscreen_btn cell] setShowsBorderOnlyWhileMouseInside: YES];
+    [[o_fullscreen_btn cell] setTag: 3];
 }
 
 - (BOOL)mouseDownCanMoveWindow
     }
 }
 
+- (void)setWindowFullscreenButtonOver:(BOOL)b_value
+{
+    if (b_value)
+        [o_fullscreen_btn setImage: [NSImage imageNamed:@"window-fullscreen-over"]];
+    else
+        [o_fullscreen_btn setImage: [NSImage imageNamed:@"window-fullscreen"]];
+}
+
 @end
 
 @implementation VLCWindowButtonCell
 
 - (void)mouseEntered:(NSEvent *)theEvent
 {
-    [(VLCMainWindowTitleView *)[[self controlView] superview] setWindowButtonOver: YES];
+    if ([self tag] == 3)
+        [(VLCMainWindowTitleView *)[[self controlView] superview] setWindowFullscreenButtonOver: YES];
+    else
+        [(VLCMainWindowTitleView *)[[self controlView] superview] setWindowButtonOver: YES];
 }
 
 - (void)mouseExited:(NSEvent *)theEvent
 {
-    [(VLCMainWindowTitleView *)[[self controlView] superview] setWindowButtonOver: NO];
+    if ([self tag] == 3)
+        [(VLCMainWindowTitleView *)[[self controlView] superview] setWindowFullscreenButtonOver: NO];
+    else
+        [(VLCMainWindowTitleView *)[[self controlView] superview] setWindowButtonOver: NO];
 }
 
 @end