diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2015-01-12 11:41:39 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2015-01-12 13:38:07 +0000 |
commit | 4e04d2a532c816f0a1222a50a5ca28310b0b9035 (patch) | |
tree | ac5891e3d9bc759a4e4d65cc31064cd83ec53b9e /examples | |
parent | c55b8fdaf8396494d5e11325966256a38ba8c524 (diff) | |
download | clutter-4e04d2a532c816f0a1222a50a5ca28310b0b9035.tar.gz |
examples/rounded: Use CLUTTER_REQUEST_CONTENT_SIZE
Show how to use the request mode to have an actor ask for the size of
its content.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/rounded-rectangle.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/rounded-rectangle.c b/examples/rounded-rectangle.c index f1c0c2360..e9fc2fda9 100644 --- a/examples/rounded-rectangle.c +++ b/examples/rounded-rectangle.c @@ -75,7 +75,8 @@ main (int argc, char *argv[]) CLUTTER_SCALING_FILTER_TRILINEAR, CLUTTER_SCALING_FILTER_LINEAR); clutter_actor_set_pivot_point (actor, 0.5f, 0.5f); - clutter_actor_add_constraint (actor, clutter_bind_constraint_new (stage, CLUTTER_BIND_SIZE, 0.f)); + clutter_actor_add_constraint (actor, clutter_align_constraint_new (stage, CLUTTER_ALIGN_BOTH, 0.5)); + clutter_actor_set_request_mode (actor, CLUTTER_REQUEST_CONTENT_SIZE); clutter_actor_add_child (stage, actor); /* the actor now owns the canvas */ |