From: Felix Paul Kühne Date: Sun, 25 Dec 2011 16:54:21 +0000 (+0100) Subject: macosx: added placeholder artwork for the title bar's fullscreen button X-Git-Tag: 2.1.0-git~6578 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=45014de4256365dce832b1983597b637ff860ae7;p=vlc macosx: added placeholder artwork for the title bar's fullscreen button --- diff --git a/Makefile.am b/Makefile.am index c3e9008efe..0dc04122e3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.xib b/extras/package/macosx/Resources/English.lproj/MainMenu.xib index 359d5e4d79..5fa0f6bcda 100644 --- a/extras/package/macosx/Resources/English.lproj/MainMenu.xib +++ b/extras/package/macosx/Resources/English.lproj/MainMenu.xib @@ -21,14 +21,14 @@ YES - - - + - + - + + + YES @@ -4469,7 +4469,7 @@ LCAuLi4 266 - {{65, 3}, {270, 17}} + {{65, 3}, {263, 17}} _NS:4068 YES @@ -4494,18 +4494,18 @@ LCAuLi4 265 - {{382, 4}, {14, 14}} + {{383, 4}, {14, 14}} _NS:610 YES - 67239424 + -2080244224 134217728 _NS:610 - -2046672641 + 134365439 6 @@ -4516,18 +4516,18 @@ LCAuLi4 268 - {{48, 3.93359375}, {15, 14}} + {{48, 4}, {15, 14}} _NS:610 YES - 67239424 + -2080244224 134217728 _NS:610 - -2046672641 + 134365439 6 @@ -4549,7 +4549,7 @@ LCAuLi4 _NS:610 - -2046672641 + 134365439 6 @@ -4571,7 +4571,7 @@ LCAuLi4 _NS:610 - -2046672641 + 134365439 6 @@ -10875,6 +10875,7 @@ LCAuLi4 4764.IBPluginDependency 4765.IBPluginDependency 4765.IBViewBoundsToFrameTransform + 4766.CustomClassName 4766.IBPluginDependency 4777.IBPluginDependency 4778.IBPluginDependency @@ -11115,9 +11116,9 @@ LCAuLi4 {{430, 565}, {137, 103}} com.apple.InterfaceBuilder.CocoaPlugin - {{246, 101}, {604, 310}} + {{329, 101}, {604, 310}} com.apple.InterfaceBuilder.CocoaPlugin - {{246, 101}, {604, 310}} + {{329, 101}, {604, 310}} @@ -11722,6 +11723,7 @@ LCAuLi4 P4AAAL+AAABDvwAAwYAAAA + VLCWindowButtonCell com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin 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 index 0000000000..83ea28ce23 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 index 0000000000..0c3eebeb2b 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 index 0000000000..0a84d4b271 Binary files /dev/null and b/extras/package/macosx/Resources/mainwindow_dark/window-fullscreen.png differ diff --git a/extras/package/macosx/vlc.xcodeproj/project.pbxproj b/extras/package/macosx/vlc.xcodeproj/project.pbxproj index 6cb1c97e8a..493d7698a5 100644 --- a/extras/package/macosx/vlc.xcodeproj/project.pbxproj +++ b/extras/package/macosx/vlc.xcodeproj/project.pbxproj @@ -202,6 +202,9 @@ 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 */; }; @@ -500,6 +503,9 @@ 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 = ""; }; + CC6FA91714A78AE700353C5F /* window-fullscreen-over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-fullscreen-over.png"; path = "Resources/mainwindow_dark/window-fullscreen-over.png"; sourceTree = ""; }; + CC6FA91814A78AE700353C5F /* window-fullscreen.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "window-fullscreen.png"; path = "Resources/mainwindow_dark/window-fullscreen.png"; sourceTree = ""; }; CC707EC3137464CD0003010A /* TrackSynchronization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TrackSynchronization.h; path = ../../../modules/gui/macosx/TrackSynchronization.h; sourceTree = ""; }; CC707EC4137464CD0003010A /* TrackSynchronization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TrackSynchronization.m; path = ../../../modules/gui/macosx/TrackSynchronization.m; sourceTree = ""; }; 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; }; @@ -814,6 +820,9 @@ 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 */, @@ -1340,6 +1349,9 @@ 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; }; diff --git a/modules/gui/macosx/MainWindowTitle.h b/modules/gui/macosx/MainWindowTitle.h index 6720f10912..405ce429a6 100644 --- a/modules/gui/macosx/MainWindowTitle.h +++ b/modules/gui/macosx/MainWindowTitle.h @@ -40,6 +40,7 @@ - (void)setWindowTitle:(NSString *)title; - (void)setFullscreenButtonHidden:(BOOL)b_value; - (void)setWindowButtonOver:(BOOL)b_value; +- (void)setWindowFullscreenButtonOver:(BOOL)b_value; @end diff --git a/modules/gui/macosx/MainWindowTitle.m b/modules/gui/macosx/MainWindowTitle.m index 528cd736b7..1b73cd7a88 100644 --- a/modules/gui/macosx/MainWindowTitle.m +++ b/modules/gui/macosx/MainWindowTitle.m @@ -43,12 +43,19 @@ [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 @@ -96,18 +103,32 @@ } } +- (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