Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sugar/graphics/style.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/sugar/graphics/style.py b/src/sugar/graphics/style.py
index 1b510d1..ce2abe8 100644
--- a/src/sugar/graphics/style.py
+++ b/src/sugar/graphics/style.py
@@ -46,15 +46,6 @@ def _compute_zoom_factor():
return 1.0
-def _compute_font_height(font):
- widget = gtk.Label('')
-
- context = widget.get_pango_context()
- pango_font = context.load_font(font.get_pango_desc())
- metrics = pango_font.get_metrics()
-
- return pango.PIXELS(metrics.get_ascent() + metrics.get_descent())
-
class Font(object):
def __init__(self, desc):
self._desc = desc
@@ -124,8 +115,8 @@ XLARGE_ICON_SIZE = zoom(55 * 2.75)
FONT_SIZE = zoom(7 * _XO_DPI / _get_screen_dpi())
FONT_NORMAL = Font('Bitstream Vera Sans %d' % FONT_SIZE)
FONT_BOLD = Font('Bitstream Vera Sans bold %d' % FONT_SIZE)
-FONT_NORMAL_H = _compute_font_height(FONT_NORMAL)
-FONT_BOLD_H = _compute_font_height(FONT_BOLD)
+FONT_NORMAL_H = zoom(24)
+FONT_BOLD_H = zoom(24)
TOOLBOX_SEPARATOR_HEIGHT = zoom(9)
TOOLBOX_HORIZONTAL_PADDING = zoom(75)