diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-08-19 11:39:13 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-08-19 11:39:13 (GMT) |
commit | 32a368bdbb5dc9ce0de9adb5a1b120b39044dd77 (patch) | |
tree | ddad7b752a46633a5de71c2e038e403b86832f41 | |
parent | fd20af1431b9f3b23128f80347f139c1816f18ce (diff) |
Adapt to the new artwork stylesheets
-rw-r--r-- | shell/home/HomeView.py | 5 | ||||
-rw-r--r-- | sugar/canvas/IconItem.py | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/shell/home/HomeView.py b/shell/home/HomeView.py index 09627b6..6424e6e 100644 --- a/shell/home/HomeView.py +++ b/shell/home/HomeView.py @@ -100,6 +100,11 @@ class Model(goocanvas.CanvasModelSimple): tasks.translate(600, 450) root.add_child(tasks) + me = IconItem('stock-buddy', 'green', 150) + me.translate(600 - (me.get_property('width') / 2), + 450 - (me.get_property('height') / 2)) + root.add_child(me) + class HomeView(goocanvas.CanvasView): def __init__(self, shell): goocanvas.CanvasView.__init__(self) diff --git a/sugar/canvas/IconItem.py b/sugar/canvas/IconItem.py index 73098b7..b4ac205 100644 --- a/sugar/canvas/IconItem.py +++ b/sugar/canvas/IconItem.py @@ -21,11 +21,14 @@ class IconCache(gobject.GObject): icon_file.close() if color != None: - style = '.fill-color {fill: %s;}' % (color) - data = re.sub('\.fill-color \{.*\}', style, data) + style = '.fill {fill:%s;stroke:%s;}' % (color, color) + data = re.sub('\.fill \{.*\}', style, data) - style = '.fill-and-stroke-color {fill: %s; stroke: %s;}' % (color, color) - data = re.sub('\.fill-and-stroke-color \{.*\}', style, data) + style = '.shape {stroke:%s;fill:%s;}' % ('black', 'black') + data = re.sub('\.shape \{.*\}', style, data) + + style = '.shape-and-fill {fill:%s; stroke:%s;}' % (color, 'black') + data = re.sub('\.shape-and-fill \{.*\}', style, data) loader = gtk.gdk.pixbuf_loader_new_with_mime_type('image/svg-xml') loader.set_size(size, size) |