adium 5163:62c457556226: This animation seems more smooth when r...

commits at adium.im commits at adium.im
Sun Oct 21 23:31:18 UTC 2012


details:	http://hg.adium.im/adium/rev/62c457556226
revision:	5163:62c457556226
branch:		adium-1.6
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Mon Oct 22 01:10:25 2012 +0200

This animation seems more smooth when ran in 0.05 seconds.

diffs (34 lines):

diff -r d59705c34be0 -r 62c457556226 Plugins/Dual Window Interface/AIMessageViewController.m
--- a/Plugins/Dual Window Interface/AIMessageViewController.m	Mon Oct 22 00:38:23 2012 +0200
+++ b/Plugins/Dual Window Interface/AIMessageViewController.m	Mon Oct 22 01:10:25 2012 +0200
@@ -1394,22 +1394,26 @@
     }
     
     NSSize splitViewSize = NSMakeSize(NSWidth(view_contents.frame), NSHeight(view_contents.frame) - yPosition);
+    
+    [NSAnimationContext beginGrouping];
+    [[NSAnimationContext currentContext] setDuration:0.05];
     if (splitViewSize.height != NSHeight(splitView_verticalSplit.frame)) {
         [splitView_verticalSplit.animator setFrameSize:splitViewSize];
     }
     
-    [view_topBars setFrameSize:NSMakeSize(NSWidth(view_contents.frame), yPosition)];
-    [view_topBars setFrameOrigin:NSMakePoint(NSMinX(view_contents.frame), NSMaxY(view_contents.frame) - yPosition)];
+    [view_topBars.animator setFrameSize:NSMakeSize(NSWidth(view_contents.frame), yPosition)];
+    [view_topBars.animator setFrameOrigin:NSMakePoint(NSMinX(view_contents.frame), NSMaxY(view_contents.frame) - yPosition)];
     
     yPosition = 0.0f;
     for (AIMessageViewTopBarController *existingController in topBarControllers.reverseObjectEnumerator) {
         if (![existingController.view isHidden]) {
-            [existingController.view setFrameOrigin:NSMakePoint(0.0f, yPosition)];
-            [existingController.view setFrameSize:NSMakeSize(NSWidth(view_contents.frame), NSHeight(existingController.view.frame))];
+            [existingController.view.animator setFrameOrigin:NSMakePoint(0.0f, yPosition)];
+            [existingController.view.animator setFrameSize:NSMakeSize(NSWidth(view_contents.frame), NSHeight(existingController.view.frame))];
             yPosition += NSHeight(existingController.view.frame);
         }
     }
     
+    [NSAnimationContext endGrouping];
     [self _updateTextEntryViewHeight];
 }
 




More information about the commits mailing list