aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmanuele Aina <em@nerd.ocracy.org>2012-03-09 23:52:11 +0800
committerEmanuele Aina <emanuele.aina@collabora.com>2012-03-12 20:18:25 +0800
commit889e9be8f513d2b8b7124b628013d7f3f0d5cdd4 (patch)
tree82d815cc05970e81ded25e04f80b252c8b2b37da /src
parent1413b47d30284825bc81ed606c458a5fa60f830f (diff)
downloadgsoc2013-empathy-889e9be8f513d2b8b7124b628013d7f3f0d5cdd4.tar
gsoc2013-empathy-889e9be8f513d2b8b7124b628013d7f3f0d5cdd4.tar.gz
gsoc2013-empathy-889e9be8f513d2b8b7124b628013d7f3f0d5cdd4.tar.bz2
gsoc2013-empathy-889e9be8f513d2b8b7124b628013d7f3f0d5cdd4.tar.lz
gsoc2013-empathy-889e9be8f513d2b8b7124b628013d7f3f0d5cdd4.tar.xz
gsoc2013-empathy-889e9be8f513d2b8b7124b628013d7f3f0d5cdd4.tar.zst
gsoc2013-empathy-889e9be8f513d2b8b7124b628013d7f3f0d5cdd4.zip
Avoid clipping buttons in the call window
Also try to set a transparent background on the GtkBin inside GtkClutteActors, but for some reason it's not working here. https://bugzilla.gnome.org/show_bug.cgi?id=671718
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index ada107c3c..565c65d00 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -1070,6 +1070,7 @@ create_video_preview (EmpathyCallWindow *self)
GtkWidget *button;
PreviewPosition pos;
GdkRGBA transparent = { 0., 0., 0., 0. };
+ GtkWidget *bin;
g_assert (priv->video_preview == NULL);
@@ -1137,18 +1138,17 @@ create_video_preview (EmpathyCallWindow *self)
/* Translators: this is an "Info" label. It should be as short
* as possible. */
button = gtk_button_new_with_label (_("i"));
- priv->preview_shown_button = b = empathy_rounded_actor_new (2);
- gtk_container_add (
- GTK_CONTAINER (gtk_clutter_actor_get_widget (GTK_CLUTTER_ACTOR (b))),
- button);
+ priv->preview_shown_button = b = gtk_clutter_actor_new_with_contents (button);
clutter_actor_set_size (b, 24, 24);
+ bin = gtk_clutter_actor_get_widget (GTK_CLUTTER_ACTOR (b));
+ gtk_widget_override_background_color (bin, GTK_STATE_FLAG_NORMAL, &transparent);
layout_end = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_END,
CLUTTER_BIN_ALIGNMENT_END);
box = clutter_box_new (layout_end);
clutter_actor_set_size (box,
- SELF_VIDEO_SECTION_WIDTH,
- SELF_VIDEO_SECTION_HEIGHT + 2 * SELF_VIDEO_SECTION_MARGIN);
+ SELF_VIDEO_SECTION_WIDTH - 4,
+ SELF_VIDEO_SECTION_HEIGHT - 2);
clutter_container_add_actor (CLUTTER_CONTAINER (box), b);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->video_preview), box);
@@ -1160,12 +1160,9 @@ create_video_preview (EmpathyCallWindow *self)
/* Translators: this is an "Info" label. It should be as short
* as possible. */
button = gtk_button_new_with_label (_("i"));
- b = empathy_rounded_actor_new (2);
- gtk_container_add (
- GTK_CONTAINER (gtk_clutter_actor_get_widget (GTK_CLUTTER_ACTOR (b))),
- button);
+ priv->preview_hidden_button = b = gtk_clutter_actor_new_with_contents (button);
clutter_actor_set_size (b, 24, 24);
- priv->preview_hidden_button = b;
+ gtk_widget_override_background_color (bin, GTK_STATE_FLAG_NORMAL, &transparent);
clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (priv->video_layout),
priv->preview_hidden_button,