[Sugar-devel] [PATCH] Pulsing icon delayed by 5 seconds or so SL#2080
Simon Schampijer
simon at schampijer.de
Thu Oct 7 02:34:31 EDT 2010
On 10/06/2010 11:37 PM, Anurag Chowdhury wrote:
> 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 reducethe frame calculation load on the processor, Hence reducing the delay.
> ---
> src/sugar/graphics/animator.py | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/src/sugar/graphics/animator.py b/src/sugar/graphics/animator.py
> index 8fb298b..2bec8ff 100644
> --- a/src/sugar/graphics/animator.py
> +++ b/src/sugar/graphics/animator.py
> @@ -25,7 +25,7 @@ import gobject
>
> EASE_OUT_EXPO = 0
> EASE_IN_EXPO = 1
> -
> +i=1
>
> class Animator(gobject.GObject):
>
> @@ -140,6 +140,10 @@ class Animation(object):
> # last frame
> frame = self.end
> else:
> + for i in range(0,5):
> + easing = EASE_IN_EXPO
> + duration = duration*100
> + i=i+1
> if easing == EASE_OUT_EXPO:
> frame = change * (-pow(2, -10 * t / duration) + 1) + start
> elif easing == EASE_IN_EXPO:
Please have a look at:
http://wiki.sugarlabs.org/go/Development_Team/Code_guidelines#Code_style
Regards,
Simon
More information about the Sugar-devel
mailing list