diff options
author | Daniel Drake <dsd@laptop.org> | 2009-11-27 11:31:42 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2009-12-01 16:51:14 (GMT) |
commit | 634b2fcee0b05e0bb8af9616f12ec60282622503 (patch) | |
tree | 9f45cbdde95c61728e94bcbeb9f195d1f587c50b /src/sugar/graphics | |
parent | 28a351541685ef02e678e44cff0005c51c0f73e1 (diff) |
Apply font configuration from GConf (#1584)
Sugar font settings are now stored in GConf. This patch applies them
to all users of sugar.style and all standard activities.
Diffstat (limited to 'src/sugar/graphics')
-rw-r--r-- | src/sugar/graphics/style.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/sugar/graphics/style.py b/src/sugar/graphics/style.py index 6d5e35e..ccc6912 100644 --- a/src/sugar/graphics/style.py +++ b/src/sugar/graphics/style.py @@ -27,6 +27,7 @@ import logging import gtk import pango +import gconf FOCUS_LINE_WIDTH = 2 @@ -115,9 +116,12 @@ MEDIUM_ICON_SIZE = zoom(55 * 1.5) LARGE_ICON_SIZE = zoom(55 * 2.0) XLARGE_ICON_SIZE = zoom(55 * 2.75) -FONT_SIZE = 10 -FONT_NORMAL = Font('Bitstream Vera Sans %d' % FONT_SIZE) -FONT_BOLD = Font('Bitstream Vera Sans bold %d' % FONT_SIZE) +client = gconf.client_get_default() +FONT_SIZE = client.get_float('/desktop/sugar/font/default_size') +FONT_FACE = client.get_string('/desktop/sugar/font/default_face') + +FONT_NORMAL = Font('%s %f' % (FONT_FACE, FONT_SIZE)) +FONT_BOLD = Font('%s %f' % (FONT_FACE, FONT_SIZE)) FONT_NORMAL_H = zoom(24) FONT_BOLD_H = zoom(24) |