From 250060b7f806c0c31cd0f0b21d84f24304eff50b Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 05 Oct 2006 12:38:37 +0000 Subject: Remove several hardcoded sizes, substitute them with stylesheets. --- (limited to 'shell/view/home/HomeBox.py') 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): -- cgit v0.9.1