Implement menu color scheme and fixup colors

This commit is contained in:
Marco Pesenti Gritti
2006-09-16 20:48:27 +02:00
parent 465253d95e
commit edba3e0082
3 changed files with 24 additions and 7 deletions
+9 -2
View File
@@ -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
+1 -1
View File
@@ -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)