MacOSX/VLC_app: port the fullscreen zoom and the fspanel from gui/macosx to VLC_app.
[vlc.git] / extras / MacOSX / VLC_app / Sources / VLCAppBindings.m
index 2e203fa..098e654 100644 (file)
 {
     return [NSSet setWithObjects:@"state", @"playing", @"canPause", nil];
 }
++ (NSSet *)keyPathsForValuesAffectingStateAsFullScreenButtonImage
+{
+    return [NSSet setWithObjects:@"state", @"playing", @"canPause", nil];
+}
++ (NSSet *)keyPathsForValuesAffectingStateAsFullScreenButtonAlternateImage
+{
+    return [NSSet setWithObjects:@"state", @"playing", @"canPause", nil];
+}
 
 - (NSString *)description
 {
     else
         return [NSImage imageNamed:@"play_blue.png"];
 }
+
+- (NSImage *)stateAsFullScreenButtonImage
+{
+    if([self state] == VLCMediaPlayerStatePlaying && [self canPause])
+        return [NSImage imageNamed:@"fs_pause.png"];
+    else if( [self state] == VLCMediaPlayerStatePlaying )
+        return [NSImage imageNamed:@"fs_stop.png"];
+    else
+        return [NSImage imageNamed:@"fs_play.png"];
+}
+
+- (NSImage *)stateAsFullScreenButtonAlternateImage
+{
+    if([self state] == VLCMediaPlayerStatePlaying && [self canPause])
+        return [NSImage imageNamed:@"fs_pause_highlight.png"];
+    else if( [self state] == VLCMediaPlayerStatePlaying )
+        return [NSImage imageNamed:@"fs_stop_highlight.png"];
+    else
+        return [NSImage imageNamed:@"fs_play_highlight.png"];
+}
+
 @end