diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-09-10 15:55:35 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-09-10 15:55:35 (GMT) |
commit | ccb0aaaa2884ba573aba88167cdee1ea28350ec2 (patch) | |
tree | ea5ab0f69ba416359473f8299b453fee08362b43 /sugar/graphics | |
parent | d8878e7d746fff5b89fcb59a195793939a3e5e78 (diff) |
Don't store the xo-color property on _IconBuffer, it will cause conflicts with stroke-color and fill-color.
Diffstat (limited to 'sugar/graphics')
-rw-r--r-- | sugar/graphics/icon.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sugar/graphics/icon.py b/sugar/graphics/icon.py index 018a428..1598e4b 100644 --- a/sugar/graphics/icon.py +++ b/sugar/graphics/icon.py @@ -78,8 +78,6 @@ class _IconBuffer(object): _loader = _SVGLoader() def __init__(self): - self._xo_color = None - self.icon_name = None self.file_name = None self.fill_color = None @@ -182,7 +180,10 @@ class _IconBuffer(object): return info def _get_xo_color(self): - return self._xo_color + if self.stroke_color and self.fill_color: + return XoColor('%s,%s' % (self.stroke_color, self.fill_color)) + else: + return None def _set_xo_color(self, xo_color): if xo_color: @@ -192,8 +193,6 @@ class _IconBuffer(object): self.stroke_color = None self.fill_color = None - self._xo_color = xo_color - def get_surface(self): cache_key = self._get_cache_key() if cache_key in self._surface_cache: |