diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-05 12:38:37 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-05 12:38:37 (GMT) |
commit | 250060b7f806c0c31cd0f0b21d84f24304eff50b (patch) | |
tree | 3975fd9a4c710f9812a272e7c3ece22c3c24d3ee /shell/view/home/HomeBox.py | |
parent | b3abf30decf9804b492f938daaedd04cc2a9aed0 (diff) |
Remove several hardcoded sizes, substitute them with stylesheets.
Diffstat (limited to 'shell/view/home/HomeBox.py')
-rw-r--r-- | shell/view/home/HomeBox.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/shell/view/home/HomeBox.py b/shell/view/home/HomeBox.py index ccaa985..019e422 100644 --- a/shell/view/home/HomeBox.py +++ b/shell/view/home/HomeBox.py @@ -2,6 +2,8 @@ import hippo from view.home.activitiesdonut import ActivitiesDonut from view.home.MyIcon import MyIcon +from sugar.graphics.grid import Grid +from sugar.graphics import style class HomeBox(hippo.CanvasBox, hippo.CanvasItem): __gtype_name__ = 'SugarHomeBox' @@ -10,10 +12,13 @@ class HomeBox(hippo.CanvasBox, hippo.CanvasItem): hippo.CanvasBox.__init__(self, background_color=0xe2e2e2ff, yalign=2) - donut = ActivitiesDonut(shell, box_width=300, box_height=300) + grid = Grid() + donut = ActivitiesDonut(shell, box_width=grid.dimension(7), + box_height=grid.dimension(7)) self.append(donut) - self._my_icon = MyIcon(120) + self._my_icon = MyIcon() + style.apply_stylesheet(self._my_icon, 'home.MyIcon') self.append(self._my_icon, hippo.PACK_FIXED) def do_allocate(self, width, height): |