Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Silva <edsiper@monotop.(none)>2007-06-26 12:28:31 (GMT)
committer Eduardo Silva <edsiper@monotop.(none)>2007-06-26 12:28:31 (GMT)
commit3ba64aa200a5cdf1226256cd2f74ec4bfe7deaa8 (patch)
treed1dc77e6d2a64fb5d13237f746462a14af3b49ff
parent0f49e6d7a87c7884964434f9141bd9b2e84b11ba (diff)
Palette: realize()
-rw-r--r--sugar/graphics/palette.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/sugar/graphics/palette.py b/sugar/graphics/palette.py
index 21c7995..aff9c3b 100644
--- a/sugar/graphics/palette.py
+++ b/sugar/graphics/palette.py
@@ -52,7 +52,7 @@ class Palette(gtk.Window):
self._alignment = ALIGNMENT_AUTOMATIC
- self._popup_anim = animator.Animator(0.6, 10)
+ self._popup_anim = animator.Animator(0.3, 10)
self._popup_anim.add(_PopupAnimation(self))
self._popup_anim.start()
@@ -235,6 +235,7 @@ class _PopupAnimation(animator.Animation):
def next_frame(self, current):
if current == 1.0:
+ self._palette.realize()
self._palette.place()
class _PopdownAnimation(animator.Animation):
@@ -296,7 +297,9 @@ class CanvasInvoker(Invoker):
def get_rect(self):
context = self._item.get_context()
- x, y = context.translate_to_screen(self._item)
+ if context:
+ x, y = context.translate_to_screen(self._item)
+
width, height = self._item.get_allocation()
return gtk.gdk.Rectangle(x, y, width, height)