Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2007-08-30 13:10:50 (GMT)
committer Simon Schampijer <simon@schampijer.de>2007-08-30 13:10:50 (GMT)
commit142ce1cb119cebb12db4640b568386b1cde26e13 (patch)
treea21cd4703f4c4e3854bf2c943275b7a0299fb059 /sugar
parente455611525d9799e572d33e9631c38ddf4cae051 (diff)
Display the rollover at 0,0 when context is empty
Diffstat (limited to 'sugar')
-rw-r--r--sugar/graphics/palette.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sugar/graphics/palette.py b/sugar/graphics/palette.py
index 26e651c..4c52421 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')