[Sugar-devel] [PATCH v3 sugar] Pulsing icon delayed by 5 seconds or so SL#2080

Anurag Chowdhury anurag at seeta.in
Sat Oct 9 07:51:12 EDT 2010


When we click on the icon of an activity we see a pulsing icon of that activity
before the activity starts and usually there is a time delay between the
clicking of the icon and appearance of the pulsing icon , where tha amount of
delay differs by the complexity of the icon i.e. more complex the icon is
larger is the delay. So here we tried to reduce that delay if not completely
obliterate it , by making the duration of the first 5 pulses larger and during
these 5 times the icon will only be zoomed in and not zoomed out so as to reduce
the frame calculation load on the processor, Hence reducing the delay.
---
 src/sugar/graphics/animator.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

v1->v2 corrected layout according to pep-8 format
v2->v3 removed increment operation of variable i in the for loop

diff --git a/src/sugar/graphics/animator.py b/src/sugar/graphics/animator.py
index 8fb298b..14e45e1 100644
--- a/src/sugar/graphics/animator.py
+++ b/src/sugar/graphics/animator.py
@@ -140,6 +140,9 @@ class Animation(object):
             # last frame
             frame = self.end
         else:
+            for i in range(5):
+                easing = EASE_IN_EXPO
+                duration = duration * 100
             if easing == EASE_OUT_EXPO:
                 frame = change * (-pow(2, -10 * t / duration) + 1) + start
             elif easing == EASE_IN_EXPO:
-- 
1.7.2.3



More information about the Sugar-devel mailing list