From 6aa94458db8c15961cb0a489cdde5ef59d6f6928 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Wed, 6 Jul 2011 12:26:19 +0100 Subject: CallWindow: add a little offset to the video preview --- src/empathy-call-window.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/empathy-call-window.c') diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 7d07aac04..ae28b8902 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -705,15 +705,25 @@ static void create_video_preview (EmpathyCallWindow *self) { EmpathyCallWindowPriv *priv = GET_PRIV (self); + ClutterLayoutManager *layout; + ClutterActor *preview; g_assert (priv->video_preview == NULL); - priv->video_preview = clutter_texture_new (); - clutter_actor_set_size (priv->video_preview, + preview = clutter_texture_new (); + clutter_actor_set_size (preview, SELF_VIDEO_SECTION_WIDTH, SELF_VIDEO_SECTION_HEIGTH); - priv->video_preview_sink = clutter_gst_video_sink_new ( - CLUTTER_TEXTURE (priv->video_preview)); + CLUTTER_TEXTURE (preview)); + + /* Add a little offset to the video preview */ + layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_END, + CLUTTER_BIN_ALIGNMENT_START); + priv->video_preview = clutter_box_new (layout); + clutter_actor_set_size (priv->video_preview, + SELF_VIDEO_SECTION_WIDTH + 10, SELF_VIDEO_SECTION_HEIGTH + 10); + clutter_container_add_actor (CLUTTER_CONTAINER (priv->video_preview), + preview); g_object_set (priv->video_preview_sink, "sync", FALSE, -- cgit v1.2.3