diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-24 20:55:13 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-24 20:55:13 (GMT) |
commit | 3f73da05492dc22e04b24a12e48c6844b5cd9726 (patch) | |
tree | 3471f8834719256e7ccf443687e285e2aa22962c /sugar | |
parent | eac58dcfede3b17163ca625813f55dbaf1d72d38 (diff) |
Some cleanups of the IconLayout
Diffstat (limited to 'sugar')
-rw-r--r-- | sugar/canvas/Grid.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sugar/canvas/Grid.py b/sugar/canvas/Grid.py index 3d586dd..70bafa3 100644 --- a/sugar/canvas/Grid.py +++ b/sugar/canvas/Grid.py @@ -31,6 +31,10 @@ class Grid: return [grid_x, grid_y] + def convert_to_canvas(self, grid_x, grid_y): + scale = 1200 / Grid.COLS + return [grid_x * scale, grid_y * scale] + def set_constraints(self, component, x, y, width=-1, height=-1): if isinstance(component, gtk.Window): self._layout_window(component, x, y, width, height) |