cookbook: Begin porting examples to the new API
Start dropping the usage of deprecated classes and API.
This commit is contained in:
@ -96,7 +96,7 @@ main (int argc, char *argv[])
|
||||
NULL);
|
||||
|
||||
/* the viewport which the box is scrolled within */
|
||||
viewport = clutter_group_new ();
|
||||
viewport = clutter_actor_new ();
|
||||
|
||||
/* viewport is shorter than the stage */
|
||||
clutter_actor_set_size (viewport, STAGE_WIDTH, STAGE_HEIGHT * 0.5);
|
||||
@ -111,10 +111,10 @@ main (int argc, char *argv[])
|
||||
clutter_actor_set_clip_to_allocation (viewport, TRUE);
|
||||
|
||||
/* put the texture inside the viewport */
|
||||
clutter_container_add_actor (CLUTTER_CONTAINER (viewport), texture);
|
||||
clutter_actor_add_child (viewport, texture);
|
||||
|
||||
/* add the viewport to the stage */
|
||||
clutter_container_add_actor (CLUTTER_CONTAINER (stage), viewport);
|
||||
clutter_actor_add_child (stage, viewport);
|
||||
|
||||
g_signal_connect (viewport,
|
||||
"scroll-event",
|
||||
|
Reference in New Issue
Block a user