Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/graphics
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-10-06 09:34:29 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-10-06 09:34:29 (GMT)
commit7f232c30c2b647f43b5ad06d393511d76cfcbdcd (patch)
treed1f41c3359d4f7c253b2df0be64c1ccbd1c807be /sugar/graphics
parent953b5bf286dd251d07eb5d72c9c5c7aed88d76e2 (diff)
More fixes
Diffstat (limited to 'sugar/graphics')
-rw-r--r--sugar/graphics/snowflakebox.py12
1 files changed, 6 insertions, 6 deletions
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