[vlc-devel] commit: macosx: slightly change scrolling behavior of the credits to the way we do it in Lunettes ( Felix Paul Kühne )

git version control git at videolan.org
Sun Aug 30 03:15:50 CEST 2009


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Aug 30 03:15:34 2009 +0200| [e024a000da4d4f6fd1eed2ab13e77868993be4c9] | committer: Felix Paul Kühne 

macosx: slightly change scrolling behavior of the credits to the way we do it in Lunettes

Basically, we starting scrolling at the beginning, if the window gets reopened and jump back to top once scrolling reached the end of the list.

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

 modules/gui/macosx/about.m |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/about.m b/modules/gui/macosx/about.m
index dc0ef54..03bbc04 100644
--- a/modules/gui/macosx/about.m
+++ b/modules/gui/macosx/about.m
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * about.m: MacOS X About Panel
  *****************************************************************************
- * Copyright (C) 2001-2007 the VideoLAN team
+ * Copyright (C) 2001-2009 the VideoLAN team
  * $Id$
  *
  * Authors: Derk-Jan Hartman <thedj at users.sourceforge.net>
@@ -112,6 +112,7 @@ static VLAboutBox *_o_sharedInstance = nil;
  
     /* Show the window */
     b_restart = YES;
+    [o_credits_textview scrollPoint:NSMakePoint( 0, 0 )];
     [o_about_window makeKeyAndOrderFront: nil];
 }
 
@@ -134,7 +135,7 @@ static VLAboutBox *_o_sharedInstance = nil;
     if( b_restart )
     {
         /* Reset the starttime */
-        i_start = [NSDate timeIntervalSinceReferenceDate] + 3.0;
+        i_start = [NSDate timeIntervalSinceReferenceDate] + 5.0;
         f_current = 0;
         f_end = [o_credits_textview bounds].size.height - [o_credits_scrollview bounds].size.height;
         b_restart = NO;
@@ -151,6 +152,7 @@ static VLAboutBox *_o_sharedInstance = nil;
         /* If at end, restart at the top */
         if( f_current >= f_end )
         {
+            [o_credits_textview scrollPoint:NSMakePoint( 0, 0 )];
             b_restart = YES;
         }
     }




More information about the vlc-devel mailing list