diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-22 12:32:07 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-22 12:32:07 (GMT) |
commit | d8c61d271ad12225b2e08cf23a8b60feccb07bd1 (patch) | |
tree | 1b7eee368827d514ae8ab2e3b2be6fb87a5a66fd /sugar | |
parent | 092ded9e5384e4506e1cfc527c4041e416371f23 (diff) |
Convert to the new icon format
Diffstat (limited to 'sugar')
-rw-r--r-- | sugar/canvas/IconColor.py | 2 | ||||
-rw-r--r-- | sugar/canvas/IconItem.py | 13 | ||||
-rw-r--r-- | sugar/canvas/Menu.py | 4 |
3 files changed, 8 insertions, 11 deletions
diff --git a/sugar/canvas/IconColor.py b/sugar/canvas/IconColor.py index 84ca409..77e67ef 100644 --- a/sugar/canvas/IconColor.py +++ b/sugar/canvas/IconColor.py @@ -4,7 +4,7 @@ from sugar.canvas import Colors def _parse_string(color_string): if color_string == 'white': - return ['white', '#4f4f4f'] + return ['#ffffff', '#4f4f4f'] splitted = color_string.split(',') if len(splitted) == 2: diff --git a/sugar/canvas/IconItem.py b/sugar/canvas/IconItem.py index c40fb44..69b3555 100644 --- a/sugar/canvas/IconItem.py +++ b/sugar/canvas/IconItem.py @@ -25,15 +25,12 @@ class _IconCache: fill = color.get_fill_color() stroke = color.get_stroke_color() + + entity = '<!ENTITY fill_color "%s">' % fill + data = re.sub('<!ENTITY fill_color .*>', entity, data) - style = '.fill {fill:%s;stroke:%s;}' % (fill, fill) - data = re.sub('\.fill \{.*\}', style, data) - - style = '.shape {stroke:%s;fill:%s;}' % (stroke, stroke) - data = re.sub('\.shape \{.*\}', style, data) - - style = '.shape-and-fill {fill:%s; stroke:%s;}' % (fill, stroke) - data = re.sub('\.shape-and-fill \{.*\}', style, data) + entity = '<!ENTITY stroke_color "%s">' % stroke + data = re.sub('<!ENTITY stroke_color .*>', entity, data) return rsvg.Handle(data=data) diff --git a/sugar/canvas/Menu.py b/sugar/canvas/Menu.py index 4b53b55..2283f15 100644 --- a/sugar/canvas/Menu.py +++ b/sugar/canvas/Menu.py @@ -45,7 +45,7 @@ class Menu(gtk.Window): self._grid.set_constraints(separator, 0, 4) self._root.add_child(separator) - box = CanvasBox(self._grid, CanvasBox.HORIZONTAL, 1) + box = CanvasBox(self._grid, CanvasBox.HORIZONTAL) self._grid.set_constraints(box, 0, 5) return box @@ -62,7 +62,7 @@ class Menu(gtk.Window): self._update_constraints() icon.connect('clicked', self._action_clicked_cb, action_id) - self._action_box.set_constraints(icon, 3, 3) + self._action_box.set_constraints(icon, 5, 5) self._action_box.add_child(icon) def _action_clicked_cb(self, icon, action): |