diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-13 12:11:12 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-13 12:11:12 (GMT) |
commit | a1d629b6cd66b183a07ec6bf2b1bfbf776caad83 (patch) | |
tree | 3b0e8222a6343c9374b455835350b232b7f9ce13 /tests | |
parent | 016891ec9a89c61a739e3b8c8d85fb640ad543b0 (diff) |
Set constraints for the added items
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test-grid.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test-grid.py b/tests/test-grid.py index 49d7e4f..ea17933 100755 --- a/tests/test-grid.py +++ b/tests/test-grid.py @@ -22,6 +22,7 @@ def _new_icon_clicked_cb(icon): def _icon_clicked_cb(icon): icon = IconItem(color=IconColor(), icon_name='activity-groupchat') icon.connect('clicked', _new_icon_clicked_cb) + box.set_constraints(icon, 3, 3) box.add_child(icon, 0) model = goocanvas.CanvasModelSimple() @@ -30,20 +31,20 @@ root = model.get_root_item() grid = Grid() box = CanvasBox(grid, CanvasBox.HORIZONTAL, 1) -grid.set_constraints(box, 5, 5) +grid.set_constraints(box, 3, 3) root.add_child(box) rect = goocanvas.Rect(fill_color='red') -box.set_constraints(rect, 5, 5) +box.set_constraints(rect, 3, 3) box.add_child(rect) icon = IconItem(color=IconColor(), icon_name='activity-web') icon.connect('clicked', _icon_clicked_cb) -box.set_constraints(icon, 5, 5) +box.set_constraints(icon, 3, 3) box.add_child(icon) icon = IconItem(color=IconColor(), icon_name='activity-groupchat') -box.set_constraints(icon, 5, 5) +box.set_constraints(icon, 3, 3) box.add_child(icon) window = gtk.Window() |