From e7381c47fdaae7d52f9e1e7a1c48d7ecadeae503 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 5 Aug 2010 17:22:50 +0100 Subject: [PATCH] bin-layout: Add a text to the test We have a rectangle, a cairo texture and a texture. Let's go add a text actor as well. --- tests/interactive/test-bin-layout.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/interactive/test-bin-layout.c b/tests/interactive/test-bin-layout.c index 5759be462..2f68b83d4 100644 --- a/tests/interactive/test-bin-layout.c +++ b/tests/interactive/test-bin-layout.c @@ -218,7 +218,6 @@ test_bin_layout_main (int argc, char *argv[]) action = clutter_click_action_new (); clutter_actor_add_action (rect, action); g_signal_connect (action, "clicked", G_CALLBACK (on_rect_clicked), box); - g_signal_connect (box, "enter-event", G_CALLBACK (on_box_enter), rect); @@ -226,6 +225,15 @@ test_bin_layout_main (int argc, char *argv[]) "leave-event", G_CALLBACK (on_box_leave), rect); + rect = clutter_text_new (); + clutter_text_set_text (CLUTTER_TEXT (rect), "A simple test"); + clutter_container_add_actor (CLUTTER_CONTAINER (box), rect); + clutter_bin_layout_set_alignment (CLUTTER_BIN_LAYOUT (layout), rect, + CLUTTER_BIN_ALIGNMENT_CENTER, + CLUTTER_BIN_ALIGNMENT_START); + clutter_actor_raise_top (rect); + clutter_actor_set_name (rect, "text"); + clutter_actor_show_all (stage); clutter_main ();