Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@laptop.org>2012-12-10 17:22:57 (GMT)
committer Manuel QuiƱones <manuq@laptop.org>2012-12-10 17:34:17 (GMT)
commite49f6211108b88c086fbf98f83d3442f1c666b2f (patch)
tree1a8806ba760608db5727fcef954ad374bd646a85
parent2a6ad05bc9a66ddaf8d57320c09ef41daa0ae4a5 (diff)
TrayIcon: get the black background and outline for palette popup - SL #4089
Do the same as in ToolButton, update do_draw method to do the drawing in the code. Signed-off-by: Simon Schampijer <simon@laptop.org> Acked-by: Manuel QuiƱones <manuq@laptop.org>
-rw-r--r--src/sugar3/graphics/tray.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/sugar3/graphics/tray.py b/src/sugar3/graphics/tray.py
index 9d12883..c0e5679 100644
--- a/src/sugar3/graphics/tray.py
+++ b/src/sugar3/graphics/tray.py
@@ -432,11 +432,21 @@ class _IconWidget(Gtk.EventBox):
def do_draw(self, cr):
palette = self.get_parent().palette
+
+ if palette and palette.is_up():
+ allocation = self.get_allocation()
+ # draw a black background, has been done by the engine before
+ cr.set_source_rgb(0, 0, 0)
+ cr.rectangle(0, 0, allocation.width, allocation.height)
+ cr.paint()
+
+ Gtk.EventBox.do_draw(self, cr)
+
if palette and palette.is_up():
invoker = palette.props.invoker
invoker.draw_rectangle(cr, palette)
- Gtk.EventBox.do_draw(self, cr)
+ return False
def get_icon(self):
return self._icon