diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-02-15 17:55:32 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-02-15 17:55:32 (GMT) |
commit | 67c9268a753f4e73ddc480462633b03ee28f9397 (patch) | |
tree | f3edf71057ac27c97c6ba937dedd59baf4b080ac /sugar/graphics/units.py | |
parent | 2e8bd12f8bcf9da314d853078ee29f35a381c537 (diff) |
Take in account screen size
Diffstat (limited to 'sugar/graphics/units.py')
-rw-r--r-- | sugar/graphics/units.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sugar/graphics/units.py b/sugar/graphics/units.py index fe39a9f..866a3d6 100644 --- a/sugar/graphics/units.py +++ b/sugar/graphics/units.py @@ -3,7 +3,8 @@ import gtk import _sugar def points_to_pixels(points): - return points * _sugar.get_screen_dpi() / 72.0 + screen_factor = gtk.gdk.screen_width() / 1200.0 + return points * _sugar.get_screen_dpi() / 72.0 * screen_factor def grid_to_pixels(units): return units * gtk.gdk.screen_width() / 16 |