[clutter] interactive/test-actors: Constraint the hands group
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] interactive/test-actors: Constraint the hands group
- Date: Mon, 15 Aug 2011 14:55:09 +0000 (UTC)
commit df107fc5baf8f69f2005bf15257eaf45875bd11c
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Mon Aug 15 15:53:58 2011 +0100
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 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tests/interactive/test-actors.c b/tests/interactive/test-actors.c
index 3143494..f3d7b23 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]