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

Anurag Chowdhury anurag at seeta.in
Mon Oct 11 20:12:40 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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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

diff --git a/src/sugar/graphics/animator.py b/src/sugar/graphics/animator.py
index 8fb298b..e3a3503 100644
--- a/src/sugar/graphics/animator.py
+++ b/src/sugar/graphics/animator.py
@@ -136,7 +136,7 @@ class Animation(object):
         start = self.start
         change = self.end - self.start
-        if t == duration:
+        if fps < 20:
             # last frame
             frame = self.end

More information about the Sugar-devel mailing list