diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-01 17:08:26 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-01 17:08:26 (GMT) |
commit | d05f1f13d325dc41674ff99020dbcb67ef78dab8 (patch) | |
tree | d945b0166003d9850a431be08257552e15eda9c5 /sugar/graphics/style.py | |
parent | be70008c0705093fbc666702c1bc208b91b45d36 (diff) |
Start rewriting our canvas stuff to cleanup and use hippo.
Out of the build.
Diffstat (limited to 'sugar/graphics/style.py')
-rw-r--r-- | sugar/graphics/style.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sugar/graphics/style.py b/sugar/graphics/style.py new file mode 100644 index 0000000..f8a0898 --- /dev/null +++ b/sugar/graphics/style.py @@ -0,0 +1,13 @@ +_styles = {} + +def register_style(name, style): + _styles[name] = style + +def apply_style(name, item): + if _styles.has_key(name): + for name in _styles.keys(): + item.set_property(name, _styles[name] + +def Style(dict): + def set_property(self, name, value): + self._properties[name] = value |