macosx: fixed 2 appearance bugs introduced in [23908]
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 29 Dec 2007 00:41:01 +0000 (00:41 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 29 Dec 2007 00:41:01 +0000 (00:41 +0000)
modules/gui/macosx/embeddedwindow.m
modules/gui/macosx/intf.m

index 0006054..b9f22cd 100644 (file)
 
 - (void)controlTintChanged
 {
+    BOOL b_playing = NO;
+    if( [o_btn_play alternateImage] == o_img_play_pressed )
+        b_playing = YES;
+    
     if( [NSColor currentControlTint] == NSGraphiteControlTint )
     {
         o_img_play_pressed = [NSImage imageNamed: @"play_embedded_graphite"];
         o_img_pause_pressed = [NSImage imageNamed: @"pause_embedded_graphite"];
         [o_btn_backward setAlternateImage: [NSImage imageNamed: @"skip_previous_embedded_graphite"]];
         [o_btn_forward setAlternateImage: [NSImage imageNamed: @"skip_forward_embedded_graphite"]];
-        [o_btn_play setAlternateImage: o_img_play_pressed];
         [o_btn_fullscreen setAlternateImage: [NSImage imageNamed: @"fullscreen_graphite"]];
     }
     else
         o_img_pause_pressed = [NSImage imageNamed: @"pause_embedded_blue"];
         [o_btn_backward setAlternateImage: [NSImage imageNamed: @"skip_previous_embedded_blue"]];
         [o_btn_forward setAlternateImage: [NSImage imageNamed: @"skip_forward_embedded_blue"]];
-        [o_btn_play setAlternateImage: o_img_play_pressed];
         [o_btn_fullscreen setAlternateImage: [NSImage imageNamed: @"fullscreen_blue"]];
     }
+    
+    if( b_playing )
+        [o_btn_play setAlternateImage: o_img_play_pressed];
+    else
+        [o_btn_play setAlternateImage: o_img_pause_pressed];
 }
 
 - (void)dealloc
index 9afa68f..029a4d6 100644 (file)
@@ -562,7 +562,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 {
     BOOL b_playing = NO;
     
-    if( [o_btn_play image] == o_img_play_pressed )
+    if( [o_btn_play alternateImage] == o_img_play_pressed )
         b_playing = YES;
     
     if( [NSColor currentControlTint] == NSGraphiteControlTint )
@@ -595,9 +595,9 @@ static VLCMain *_o_sharedMainInstance = nil;
     }
     
     if( b_playing )
-        [o_btn_play setImage: o_img_play_pressed];
+        [o_btn_play setAlternateImage: o_img_play_pressed];
     else
-        [o_btn_play setImage: o_img_pause_pressed];
+        [o_btn_play setAlternateImage: o_img_pause_pressed];
 }
 
 - (void)initStrings