Palette: realize()

This commit is contained in:
Eduardo Silva 2007-06-26 08:28:31 -04:00
parent 0f49e6d7a8
commit 3ba64aa200

View File

@ -52,7 +52,7 @@ class Palette(gtk.Window):
self._alignment = ALIGNMENT_AUTOMATIC 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.add(_PopupAnimation(self))
self._popup_anim.start() self._popup_anim.start()
@ -235,6 +235,7 @@ class _PopupAnimation(animator.Animation):
def next_frame(self, current): def next_frame(self, current):
if current == 1.0: if current == 1.0:
self._palette.realize()
self._palette.place() self._palette.place()
class _PopdownAnimation(animator.Animation): class _PopdownAnimation(animator.Animation):
@ -296,7 +297,9 @@ class CanvasInvoker(Invoker):
def get_rect(self): def get_rect(self):
context = self._item.get_context() context = self._item.get_context()
if context:
x, y = context.translate_to_screen(self._item) x, y = context.translate_to_screen(self._item)
width, height = self._item.get_allocation() width, height = self._item.get_allocation()
return gtk.gdk.Rectangle(x, y, width, height) return gtk.gdk.Rectangle(x, y, width, height)