diff options
author | Eduardo Silva <edsiper@monotop.(none)> | 2007-07-09 14:09:24 (GMT) |
---|---|---|
committer | Eduardo Silva <edsiper@monotop.(none)> | 2007-07-09 14:09:24 (GMT) |
commit | aa6a02436859df3d2d803d945a94d1cdd4b77772 (patch) | |
tree | adb3b80b6eac8e02390ecf786c1960dcae6c5ed1 /sugar/graphics/style.py | |
parent | 40ed24f0fe1d34198c105a4c1396282e244fbba9 (diff) |
Move code to use style instead font.py (removed)
Diffstat (limited to 'sugar/graphics/style.py')
-rw-r--r-- | sugar/graphics/style.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sugar/graphics/style.py b/sugar/graphics/style.py index b26ca56..fedbc9e 100644 --- a/sugar/graphics/style.py +++ b/sugar/graphics/style.py @@ -16,6 +16,7 @@ # Boston, MA 02111-1307, USA. import gtk +import pango def _compute_zoom_factor(): return gtk.gdk.screen_width() / 1200.0 @@ -27,8 +28,8 @@ def _compute_font_height(font): widget = gtk.Label('') context = widget.get_pango_context() - font = context.load_font(font.get_pango_desc()) - metrics = font.get_metrics() + pango_font = context.load_font(font.get_pango_desc()) + metrics = pango_font.get_metrics() return pango.PIXELS(metrics.get_ascent() + metrics.get_descent()) |