[clutter] examples/rounded: Use CLUTTER_REQUEST_CONTENT_SIZE
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] examples/rounded: Use CLUTTER_REQUEST_CONTENT_SIZE
- Date: Mon, 12 Jan 2015 13:38:38 +0000 (UTC)
commit 4e04d2a532c816f0a1222a50a5ca28310b0b9035
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Jan 12 11:41:39 2015 +0000
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.
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 f1c0c23..e9fc2fd 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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]