The call window has previews in the four corners, before the lower
ones were packed in a way that they would appear above the floating
toolbar which looks strange when the floating toolbar disappears.
Instead allow the lower preview to be below the floating toolbar so
they're evenly spread out.
ClutterActor *video_box;
ClutterLayoutManager *video_layout;
ClutterActor *video_box;
ClutterLayoutManager *video_layout;
- /* A Box layout manager containing a bin for previews
+ /* A bin layout manager containing a bin for previews
* and the floating toolbar */
* and the floating toolbar */
- ClutterActor *overlay_box;
+ ClutterActor *overlay_bin;
ClutterLayoutManager *overlay_layout;
/* Bin layout for the previews */
ClutterLayoutManager *overlay_layout;
/* Bin layout for the previews */
gtk_widget_set_visible (self->priv->remote_user_avatar_widget, !show);
gtk_widget_set_visible (self->priv->remote_user_avatar_widget, !show);
- clutter_actor_raise_top (self->priv->overlay_box);
+ clutter_actor_raise_top (self->priv->overlay_bin);
CLUTTER_BIN_ALIGNMENT_CENTER, CLUTTER_BIN_ALIGNMENT_CENTER);
self->priv->preview_box = box = clutter_box_new (self->priv->preview_layout);
CLUTTER_BIN_ALIGNMENT_CENTER, CLUTTER_BIN_ALIGNMENT_CENTER);
self->priv->preview_box = box = clutter_box_new (self->priv->preview_layout);
- clutter_box_layout_pack (CLUTTER_BOX_LAYOUT (self->priv->overlay_layout),
- box, TRUE, TRUE, TRUE,
- CLUTTER_BOX_ALIGNMENT_CENTER, CLUTTER_BOX_ALIGNMENT_START);
+ clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (self->priv->overlay_layout),
+ box,
+ CLUTTER_BIN_ALIGNMENT_FILL, CLUTTER_BIN_ALIGNMENT_FILL);
self->priv->preview_rectangle1 =
empathy_call_window_create_preview_rectangle (self,
self->priv->preview_rectangle1 =
empathy_call_window_create_preview_rectangle (self,
TRUE, TRUE, 0);
/* main contents remote avatar/video box */
TRUE, TRUE, 0);
/* main contents remote avatar/video box */
- priv->video_layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_CENTER,
- CLUTTER_BIN_ALIGNMENT_CENTER);
+ priv->video_layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_FILL,
+ CLUTTER_BIN_ALIGNMENT_FILL);
priv->video_box = clutter_box_new (priv->video_layout);
priv->video_box = clutter_box_new (priv->video_layout);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->video_box),
remote_avatar);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->video_box),
remote_avatar);
- /* create the overlay box */
- priv->overlay_layout = clutter_box_layout_new ();
- clutter_box_layout_set_vertical (
- CLUTTER_BOX_LAYOUT (priv->overlay_layout), TRUE);
- priv->overlay_box = clutter_actor_new ();
- clutter_actor_set_layout_manager (priv->overlay_box, priv->overlay_layout);
+ /* create the overlay bin */
+ priv->overlay_layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_CENTER,
+ CLUTTER_BIN_ALIGNMENT_CENTER);
+ priv->overlay_bin = clutter_actor_new ();
+ clutter_actor_set_layout_manager (priv->overlay_bin, priv->overlay_layout);
- clutter_actor_set_margin (priv->overlay_box, &overlay_margin);
+ clutter_actor_set_margin (priv->overlay_bin, &overlay_margin);
clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (priv->video_layout),
clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (priv->video_layout),
CLUTTER_BIN_ALIGNMENT_FILL, CLUTTER_BIN_ALIGNMENT_FILL);
empathy_call_window_create_preview_rectangles (self);
CLUTTER_BIN_ALIGNMENT_FILL, CLUTTER_BIN_ALIGNMENT_FILL);
empathy_call_window_create_preview_rectangles (self);
gtk_widget_reparent (priv->bottom_toolbar,
gtk_clutter_actor_get_widget (GTK_CLUTTER_ACTOR (priv->floating_toolbar)));
gtk_widget_reparent (priv->bottom_toolbar,
gtk_clutter_actor_get_widget (GTK_CLUTTER_ACTOR (priv->floating_toolbar)));
- clutter_box_layout_pack (CLUTTER_BOX_LAYOUT (priv->overlay_layout),
- priv->floating_toolbar, FALSE, FALSE, FALSE,
- CLUTTER_BOX_ALIGNMENT_CENTER, CLUTTER_BOX_ALIGNMENT_END);
+ clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (priv->overlay_layout),
+ priv->floating_toolbar,
+ CLUTTER_BIN_ALIGNMENT_CENTER, CLUTTER_BIN_ALIGNMENT_END);
clutter_actor_set_opacity (priv->floating_toolbar, FLOATING_TOOLBAR_OPACITY);
clutter_actor_set_opacity (priv->floating_toolbar, FLOATING_TOOLBAR_OPACITY);
{
gtk_widget_hide (self->priv->remote_user_avatar_widget);
clutter_actor_show (self->priv->video_output);
{
gtk_widget_hide (self->priv->remote_user_avatar_widget);
clutter_actor_show (self->priv->video_output);
- clutter_actor_raise_top (self->priv->overlay_box);
+ clutter_actor_raise_top (self->priv->overlay_bin);