Hello,
I need to implement a simple web browser window with toolbar, web view and
status bar stretched to the full size of window.
I don't understand, why the status bar doesn't appear. Or how do I get it to
visualize sticked to stage's bottom?
Here's my code
mainLayout = clutter_box_layout_new();
clutter_box_layout_set_vertical(CLUTTER_BOX_LAYOUT(mainLayout), TRUE);
clutter_actor_get_allocation_box(stage, &stageAllocation);
stageWidth = stageAllocation.x2 - stageAllocation.x1;
stageHeight = stageAllocation.y2 - stageAllocation.y1;
mainLayoutContainer = clutter_box_new(mainLayout);
clutter_actor_set_size(mainLayoutContainer, stageWidth, stageHeight);
width_binding = clutter_bind_constraint_new(stage, CLUTTER_BIND_WIDTH, 0);
height_binding = clutter_bind_constraint_new(stage, CLUTTER_BIND_HEIGHT, 0);
clutter_actor_add_constraint(mainLayoutContainer, width_binding);
clutter_actor_add_constraint(mainLayoutContainer, height_binding);
toolbarBinLayout = clutter_bin_layout_new(CLUTTER_BIN_ALIGNMENT_FILL,
CLUTTER_BIN_ALIGNMENT_CENTER);
toolbarBinContainer = clutter_box_new(toolbarBinLayout);
...
clutter_box_pack(CLUTTER_BOX(mainLayoutContainer), CLUTTER_ACTOR(web_view),
NULL, NULL);
clutter_box_layout_set_expand(CLUTTER_BOX_LAYOUT(mainLayout),
toolbarBinContainer, TRUE);
clutter_box_layout_set_fill(CLUTTER_BOX_LAYOUT(mainLayout),
toolbarBinContainer, TRUE, TRUE);
statusBar = clutter_rectangle_new_with_color(&grayColor);
clutter_actor_set_height(statusBar, 16);
clutter_box_pack(CLUTTER_BOX(mainLayoutContainer), statusBar, NULL, NULL);
clutter_box_layout_set_expand(CLUTTER_BOX_LAYOUT(mainLayout), statusBar,
TRUE);
clutter_box_layout_set_fill(CLUTTER_BOX_LAYOUT(mainLayout), statusBar,
TRUE, FALSE);
clutter_container_add(CLUTTER_CONTAINER(stage), mainLayoutContainer, NULL);
Thank you.
Viatcheslav Gachkaylo
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list