From df107fc5baf8f69f2005bf15257eaf45875bd11c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 15 Aug 2011 15:53:58 +0100 Subject: [PATCH] interactive/test-actors: Constraint the hands group Use constraints to align and size the ClutterGroup containing the spinning hands so that resizing the stage doesn't look like arse. --- tests/interactive/test-actors.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/interactive/test-actors.c b/tests/interactive/test-actors.c index 3143494c0..f3d7b2348 100644 --- a/tests/interactive/test-actors.c +++ b/tests/interactive/test-actors.c @@ -216,6 +216,9 @@ test_actors_main (int argc, char *argv[]) oh->group = clutter_group_new(); clutter_actor_set_name (oh->group, "Group"); g_signal_connect (oh->group, "destroy", G_CALLBACK (on_group_destroy), oh); + clutter_actor_add_constraint (oh->group, clutter_align_constraint_new (stage, CLUTTER_ALIGN_X_AXIS, 0.5)); + clutter_actor_add_constraint (oh->group, clutter_align_constraint_new (stage, CLUTTER_ALIGN_Y_AXIS, 0.5)); + clutter_actor_add_constraint (oh->group, clutter_bind_constraint_new (stage, CLUTTER_BIND_SIZE, 0.0f)); oh->hand = g_new (ClutterActor*, n_hands);