Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2008-09-10 10:36:27 (GMT)
committer Simon Schampijer <simon@schampijer.de>2008-09-10 10:37:23 (GMT)
commitefddb7c41dff3df225430970f2759798c2825f91 (patch)
treeaa1ed918822c06eef74d755b1f15b43a6fcc8e1f /src
parent1e905d709ea8227612cdd2ecaae14fc57304be02 (diff)
Remove "dynamic" font height computation #8392 (marco)
Diffstat (limited to 'src')
-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)