diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-04-15 09:39:06 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-04-15 09:39:06 (GMT) |
commit | c738ac488e457d877d6da05f50e953524fb4cfdb (patch) | |
tree | c8667d3a02852b9808e29916a12556e5996ee2d6 /sugar/graphics/snowflakebox.py | |
parent | a2de1f7f3fa5ecec7d4004be3fb839932a938389 (diff) |
Fix SnowflakeBox
Diffstat (limited to 'sugar/graphics/snowflakebox.py')
-rw-r--r-- | sugar/graphics/snowflakebox.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sugar/graphics/snowflakebox.py b/sugar/graphics/snowflakebox.py index dfef45b..14f4559 100644 --- a/sugar/graphics/snowflakebox.py +++ b/sugar/graphics/snowflakebox.py @@ -20,9 +20,11 @@ import math import cairo import hippo -_BASE_RADIUS = 65 +from sugar.graphics import units + +_BASE_RADIUS = units.points_to_pixels(20) _CHILDREN_FACTOR = 1 -_FLAKE_DISTANCE = 6 +_FLAKE_DISTANCE = units.points_to_pixels(4) class SnowflakeBox(hippo.CanvasBox, hippo.CanvasItem): __gtype_name__ = 'SugarSnowflakeBox' @@ -67,6 +69,13 @@ class SnowflakeBox(hippo.CanvasBox, hippo.CanvasItem): self.set_position(child, int(x), int(y)) + def do_get_height_request(self, for_width): + hippo.CanvasBox.do_get_height_request(self, for_width) + + height = for_width + + return (height, height) + def do_get_width_request(self): hippo.CanvasBox.do_get_width_request(self) |