Take in account screen size

This commit is contained in:
Marco Pesenti Gritti 2007-02-15 18:55:32 +01:00
parent 2e8bd12f8b
commit 67c9268a75

View File

@ -3,7 +3,8 @@ import gtk
import _sugar import _sugar
def points_to_pixels(points): 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): def grid_to_pixels(units):
return units * gtk.gdk.screen_width() / 16 return units * gtk.gdk.screen_width() / 16