From a1d629b6cd66b183a07ec6bf2b1bfbf776caad83 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Wed, 13 Sep 2006 14:11:12 +0200 Subject: [PATCH] Set constraints for the added items --- tests/test-grid.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test-grid.py b/tests/test-grid.py index 49d7e4f6..ea179333 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()