From 7f232c30c2b647f43b5ad06d393511d76cfcbdcd Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 06 Oct 2006 09:34:29 +0000 Subject: More fixes --- diff --git a/sugar/graphics/snowflakebox.py b/sugar/graphics/snowflakebox.py index 48e337a..86831f7 100644 --- a/sugar/graphics/snowflakebox.py +++ b/sugar/graphics/snowflakebox.py @@ -44,7 +44,8 @@ class SnowflakeBox(hippo.CanvasBox, hippo.CanvasItem): max_child_size = 0 for child in self.get_children(): - [width, height] = child.get_allocation() + width = child.get_width_request() + height = child.get_height_request(width) max_child_size = max (max_child_size, width) max_child_size = max (max_child_size, height) @@ -52,20 +53,19 @@ class SnowflakeBox(hippo.CanvasBox, hippo.CanvasItem): def do_get_height_request(self, width): hippo.CanvasBox.do_get_height_request(self, width) - return width def do_allocate(self, width, height): - self._r = _BASE_RADIUS + _CHILDREN_FACTOR * len(self.get_children()) - hippo.CanvasBox.do_allocate(self, width, height) self._cx = width / 2 self._cy = height / 2 + self._r = _BASE_RADIUS + _CHILDREN_FACTOR * len(self.get_children()) self._layout_root() index = 0 for child in self.get_children(): - self._layout_child(child, index) - index += 1 + if child != self._root: + self._layout_child(child, index) + index += 1 -- cgit v0.9.1