[vlc-commits] macosx: fix another rendering issue with the 'time slider' s fancy gradient effect'

Felix Paul Kühne git at videolan.org
Sat Dec 31 03:52:03 CET 2011


vlc/vlc-1.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Dec 30 21:20:23 2011 +0100| [d17ad9e3fee7e31a5df5a8f6fcaf1b0b8c304650] | committer: Jean-Baptiste Kempf

macosx: fix another rendering issue with the 'time slider's fancy gradient effect'
(cherry picked from commit ebab71b58b6f4309d7f851e861dbd65a2c9e20d6)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=d17ad9e3fee7e31a5df5a8f6fcaf1b0b8c304650
---

 .../macosx/Resources/English.lproj/MainMenu.xib    |    4 ++--
 modules/gui/macosx/MainWindow.m                    |   16 +++++++---------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.xib b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
index fa9e65f..17e0635 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.xib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
@@ -24,7 +24,7 @@
       <integer value="4895"/>
       <integer value="1617"/>
       <integer value="4596"/>
-      <integer value="4756"/>
+      <integer value="2"/>
       <integer value="2730"/>
       <integer value="4722"/>
       <integer value="915"/>
@@ -608,7 +608,7 @@
             </object>
             <object class="NSCustomView" id="515305233">
               <reference key="NSNextResponder" ref="429932428"/>
-              <int key="NSvFlags">-2147483374</int>
+              <int key="NSvFlags">-2147479278</int>
               <string key="NSFrame">{{401, 110}, {163, 96}}</string>
               <reference key="NSSuperview" ref="429932428"/>
               <object class="CIAdditionCompositing" key="NSViewCompositeFilter">
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index de69241..c84f383 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -411,16 +411,16 @@ static VLCMainWindow *_o_sharedInstance = nil;
         [o_video_view setFrame: winrect];
         previousSavedFrame = winrect;
 
-        if (OSX_LION)
-            [o_resize_view setImage: NULL];
-
-        if ([self styleMask] & NSResizableWindowMask)
-            [o_resize_view removeFromSuperviewWithoutNeedingDisplay];
-
         [self display];
     }
     else
         [o_video_view setFrame: [o_split_view frame]];
+
+    if (OSX_LION)
+        [o_resize_view setImage: NULL];
+
+    if ([self styleMask] & NSResizableWindowMask)
+        [o_resize_view removeFromSuperviewWithoutNeedingDisplay];
 }
 
 #pragma mark -
@@ -521,13 +521,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
         if ([o_video_view isHidden] && [o_playlist_btn isEnabled]) {
             [o_split_view setHidden: YES];
             [o_video_view setHidden: NO];
-            NSLog( @"showing pl" );
         }
         else
         {
             [o_video_view setHidden: YES];
             [o_split_view setHidden: NO];
-            NSLog( @"show vout" );
         }
     }
     else
@@ -1021,7 +1019,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 - (void)drawFancyGradientEffectForTimeSlider
 {
     NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
-    float f_value = ([o_time_sld frame].size.width - [o_time_sld frame].origin.x - [o_time_sld knobPosition]) * -1.0;
+    CGFloat f_value = [o_time_sld knobPosition];
     if (f_value > 7.5)
     {
         NSRect oldFrame = [o_time_sld_fancygradient_view frame];



More information about the vlc-commits mailing list