From 142ce1cb119cebb12db4640b568386b1cde26e13 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Thu, 30 Aug 2007 15:10:50 +0200 Subject: [PATCH] Display the rollover at 0,0 when context is empty --- sugar/graphics/palette.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sugar/graphics/palette.py b/sugar/graphics/palette.py index 26e651c8..4c52421a 100644 --- a/sugar/graphics/palette.py +++ b/sugar/graphics/palette.py @@ -637,11 +637,11 @@ class CanvasInvoker(Invoker): context = self._item.get_context() if context: x, y = context.translate_to_screen(self._item) - - width, height = self._item.get_allocation() - - return gtk.gdk.Rectangle(x, y, width, height) - + width, height = self._item.get_allocation() + return gtk.gdk.Rectangle(x, y, width, height) + else: + return gtk.gdk.Rectangle() + def _motion_notify_event_cb(self, button, event): if event.detail == hippo.MOTION_DETAIL_ENTER: self.emit('mouse-enter')