Commit b3dfa71c authored by Emmanuele Bassi's avatar Emmanuele Bassi

2.0: Remove deprecated API from ClutterBoxLayout

parent ad4d475d
This diff is collapsed.
......@@ -76,8 +76,7 @@ struct _ClutterBinLayoutClass
GType clutter_bin_layout_get_type (void) G_GNUC_CONST;
ClutterLayoutManager *clutter_bin_layout_new (ClutterBinAlignment x_align,
ClutterBinAlignment y_align);
ClutterLayoutManager * clutter_bin_layout_new (void);
G_END_DECLS
......
This diff is collapsed.
......@@ -180,9 +180,8 @@ main (int argc, char *argv[])
clutter_actor_show (stage);
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
/* this is our BinLayout, with its default alignments */
layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_CENTER,
CLUTTER_BIN_ALIGNMENT_CENTER);
/* this is our BinLayout */
layout = clutter_bin_layout_new ();
/* the main container; this actor will use the BinLayout to lay
* out its children; we use the anchor point to keep it centered
......
......@@ -137,7 +137,6 @@ add_actor (ClutterActor *box,
{
ClutterActor *rect, *text;
ClutterColor color;
ClutterLayoutManager *layout;
clutter_color_from_hls (&color,
g_random_double_range (0.0, 360.0),
......@@ -145,10 +144,8 @@ add_actor (ClutterActor *box,
0.5);
color.alpha = 255;
layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_CENTER,
CLUTTER_BIN_ALIGNMENT_CENTER);
rect = clutter_actor_new ();
clutter_actor_set_layout_manager (rect, layout);
clutter_actor_set_layout_manager (rect, clutter_bin_layout_new ());
clutter_actor_set_background_color (rect, &color);
clutter_actor_set_reactive (rect, TRUE);
clutter_actor_set_size (rect, 32, 64);
......
......@@ -199,9 +199,9 @@ add_actor (ClutterActor *box,
gint width,
gint height)
{
ClutterLayoutManager *layout;
ClutterActor *rect, *text;
ClutterColor color;
ClutterLayoutManager *layout;
clutter_color_from_hls (&color,
g_random_double_range (0.0, 360.0),
......@@ -209,10 +209,8 @@ add_actor (ClutterActor *box,
0.5);
color.alpha = 255;
layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_CENTER,
CLUTTER_BIN_ALIGNMENT_CENTER);
rect = clutter_actor_new ();
clutter_actor_set_layout_manager (rect, layout);
clutter_actor_set_layout_manager (rect, clutter_bin_layout_new ());
clutter_actor_set_background_color (rect, &color);
clutter_actor_set_reactive (rect, TRUE);
......@@ -341,10 +339,9 @@ main (int argc, char *argv[])
clutter_actor_set_x_expand (box, TRUE);
clutter_actor_set_y_expand (box, TRUE);
clutter_actor_set_layout_manager (box, grid_layout);
clutter_box_layout_pack (CLUTTER_BOX_LAYOUT (stage_layout), box,
TRUE, TRUE, TRUE,
CLUTTER_BOX_ALIGNMENT_CENTER,
CLUTTER_BOX_ALIGNMENT_CENTER);
clutter_actor_add_child (stage, box);
clutter_actor_set_x_align (box, CLUTTER_ACTOR_ALIGN_FILL);
clutter_actor_set_y_align (box, CLUTTER_ACTOR_ALIGN_FILL);
add_actor (box, 0, 0, 1, 1);
add_actor (box, 1, 0, 1, 1);
......@@ -360,10 +357,9 @@ main (int argc, char *argv[])
clutter_actor_set_margin_top (instructions, 4);
clutter_actor_set_margin_left (instructions, 4);
clutter_actor_set_margin_bottom (instructions, 4);
clutter_box_layout_pack (CLUTTER_BOX_LAYOUT (stage_layout), instructions,
FALSE, TRUE, FALSE,
CLUTTER_BOX_ALIGNMENT_START,
CLUTTER_BOX_ALIGNMENT_CENTER);
clutter_actor_add_child (stage, instructions);
clutter_actor_set_x_align (instructions, CLUTTER_ACTOR_ALIGN_FILL);
clutter_actor_set_y_align (instructions, CLUTTER_ACTOR_ALIGN_CENTER);
g_signal_connect (stage, "destroy",
G_CALLBACK (clutter_main_quit), NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment