aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-06 17:31:45 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-12 16:46:23 +0800
commit519ed53f758fdbcde07089275dfcb94e76f0aaf2 (patch)
tree9ccfa46a2df87e9c80b22ce8ec5d0882f0a6d490 /src
parent8dfbb6d5db069cd31e5c5223b0dee5841b1845fe (diff)
downloadgsoc2013-empathy-519ed53f758fdbcde07089275dfcb94e76f0aaf2.tar
gsoc2013-empathy-519ed53f758fdbcde07089275dfcb94e76f0aaf2.tar.gz
gsoc2013-empathy-519ed53f758fdbcde07089275dfcb94e76f0aaf2.tar.bz2
gsoc2013-empathy-519ed53f758fdbcde07089275dfcb94e76f0aaf2.tar.lz
gsoc2013-empathy-519ed53f758fdbcde07089275dfcb94e76f0aaf2.tar.xz
gsoc2013-empathy-519ed53f758fdbcde07089275dfcb94e76f0aaf2.tar.zst
gsoc2013-empathy-519ed53f758fdbcde07089275dfcb94e76f0aaf2.zip
CallWindow: set the video container background color
...to match the rest of the window.
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 07a8404f9..7d07aac04 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -1022,6 +1022,9 @@ empathy_call_window_init (EmpathyCallWindow *self)
GtkWidget *scroll;
ClutterConstraint *size_constraint;
ClutterActor *remote_avatar;
+ GtkStyleContext *context;
+ GdkRGBA rgba;
+ ClutterColor bg;
priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
EMPATHY_TYPE_CALL_WINDOW, EmpathyCallWindowPriv);
@@ -1091,6 +1094,20 @@ empathy_call_window_init (EmpathyCallWindow *self)
priv->video_box = clutter_box_new (priv->video_layout);
priv->video_container = gtk_clutter_embed_new ();
+
+ /* Set the background color to that of the rest of the window */
+ context = gtk_widget_get_style_context (priv->content_hbox);
+ gtk_style_context_get_background_color (context,
+ GTK_STATE_FLAG_NORMAL, &rgba);
+ bg.red = CLAMP (rgba.red * 255.0, 0, 255);
+ bg.green = CLAMP (rgba.green * 255.0, 0, 255);
+ bg.blue = CLAMP (rgba.blue * 255.0, 0, 255);
+ bg.alpha = CLAMP (rgba.alpha * 255.0, 0, 255);
+ clutter_stage_set_color (
+ CLUTTER_STAGE (gtk_clutter_embed_get_stage (
+ GTK_CLUTTER_EMBED (priv->video_container))),
+ &bg);
+
clutter_container_add (
CLUTTER_CONTAINER (gtk_clutter_embed_get_stage (
GTK_CLUTTER_EMBED (priv->video_container))),