Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-09-16 18:48:27 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-09-16 18:48:27 (GMT)
commitedba3e008287a7849069b36e62a6abc1af1249b8 (patch)
tree86a8fb80d234211c5947e1648972cd9c948d4750 /shell
parent465253d95e02f45f1637937b8cfd1c49bf131426 (diff)
Implement menu color scheme and fixup colors
Diffstat (limited to 'shell')
-rw-r--r--shell/view/BuddyMenu.py11
-rw-r--r--shell/view/frame/TopPanel.py2
2 files changed, 10 insertions, 3 deletions
diff --git a/shell/view/BuddyMenu.py b/shell/view/BuddyMenu.py
index 6871db1..ad0c4c6 100644
--- a/shell/view/BuddyMenu.py
+++ b/shell/view/BuddyMenu.py
@@ -1,4 +1,5 @@
from sugar.canvas.Menu import Menu
+from sugar.canvas.Menu import MenuColorScheme
from sugar.canvas.IconItem import IconItem
from sugar.presence import PresenceService
@@ -9,8 +10,14 @@ class BuddyMenu(Menu):
def __init__(self, shell, buddy):
color = buddy.get_color()
- Menu.__init__(self, shell.get_grid(), buddy.get_name(),
- color.get_fill_color(), color.get_stroke_color())
+
+ color_scheme = MenuColorScheme()
+ color_scheme.text = 'black'
+ color_scheme.border = color.get_stroke_color()
+ color_scheme.background = color.get_fill_color()
+ color_scheme.separator = 'black'
+
+ Menu.__init__(self, shell.get_grid(), buddy.get_name(), color_scheme)
self._buddy = buddy
self._shell = shell
diff --git a/shell/view/frame/TopPanel.py b/shell/view/frame/TopPanel.py
index 128430e..5d18141 100644
--- a/shell/view/frame/TopPanel.py
+++ b/shell/view/frame/TopPanel.py
@@ -11,7 +11,7 @@ class ActivityMenu(Menu):
def __init__(self, grid, activity_host):
title = activity_host.get_title()
- Menu.__init__(self, grid, title, 'black', 'black')
+ Menu.__init__(self, grid, title)
icon = IconItem(icon_name='stock-share')
self.add_action(icon, ActivityMenu.ACTION_SHARE)