Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/test-snowflake-box.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-10-24 23:20:17 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-10-24 23:20:17 (GMT)
commit71c08b526f25f80a2b98f447cdac2346f6b4460f (patch)
tree875a4abc346008a3beaf1c587d26bc466c0b0185 /tests/test-snowflake-box.py
parentcfa8c980b5e0d7a6b1cf4e18367c61b5dcba09cd (diff)
Add a few snowflakes and pack them in a spread box
Diffstat (limited to 'tests/test-snowflake-box.py')
-rwxr-xr-xtests/test-snowflake-box.py29
1 files changed, 20 insertions, 9 deletions
diff --git a/tests/test-snowflake-box.py b/tests/test-snowflake-box.py
index e3418a8..f05077d 100755
--- a/tests/test-snowflake-box.py
+++ b/tests/test-snowflake-box.py
@@ -27,6 +27,7 @@ import gtk
import hippo
from sugar.graphics.snowflakebox import SnowflakeBox
+from sugar.graphics.spreadbox import SpreadBox
from sugar.graphics.iconcolor import IconColor
from sugar.graphics.canvasicon import CanvasIcon
@@ -49,18 +50,28 @@ window.show()
canvas = hippo.Canvas()
-root_box = hippo.CanvasBox(background_color=0xe2e2e2ff)
+root_box = SpreadBox(background_color=0xe2e2e2ff)
canvas.set_root(root_box)
-box1 = SnowflakeBox()
-snow_flake = _create_snowflake(box1, 30)
-root_box.append(box1, hippo.PACK_FIXED)
-root_box.move(box1, 0, 0)
+box = SnowflakeBox()
+snow_flake = _create_snowflake(box, 30)
+root_box.add_item(box)
-box2 = SnowflakeBox()
-snow_flake = _create_snowflake(box2, 10)
-root_box.append(box2, hippo.PACK_FIXED)
-root_box.move(box2, 400, 0)
+box = SnowflakeBox()
+snow_flake = _create_snowflake(box, 15)
+root_box.add_item(box)
+
+box = SnowflakeBox()
+snow_flake = _create_snowflake(box, 10)
+root_box.add_item(box)
+
+box = SnowflakeBox()
+snow_flake = _create_snowflake(box, 5)
+root_box.add_item(box)
+
+box = SnowflakeBox()
+snow_flake = _create_snowflake(box, 2)
+root_box.add_item(box)
canvas.show()
window.add(canvas)