Cache the donut animation.
This commit is contained in:
parent
7042b4392e
commit
ba4f68ef58
@ -159,6 +159,7 @@ class ActivityIcon(CanvasIcon):
|
||||
if self._pulse_id:
|
||||
return
|
||||
|
||||
self.props.cache_size = self._level_max
|
||||
self._pulse_id = gobject.timeout_add(self._INTERVAL, self._pulse_cb)
|
||||
|
||||
def _stop_pulsing(self):
|
||||
@ -167,6 +168,7 @@ class ActivityIcon(CanvasIcon):
|
||||
|
||||
self._cleanup()
|
||||
self._level = 100.0
|
||||
self.props.cache_size = 1
|
||||
self.props.xo_color = self._orig_color
|
||||
|
||||
def _resume_activate_cb(self, menuitem):
|
||||
|
@ -285,7 +285,7 @@ class _IconBuffer(object):
|
||||
def set_cache_size(self, cache_size):
|
||||
while len(self._surface_cache) > cache_size:
|
||||
self._surface_cache.popitem()
|
||||
self._cache_size
|
||||
self._cache_size = cache_size
|
||||
|
||||
cache_size = property(get_cache_size, set_cache_size)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user