diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-24 21:49:06 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-06-14 15:21:47 +0800 |
commit | 1a11cdd2f0e8ee312d0857db9a12da416f0adce9 (patch) | |
tree | 69227396e114cd3afe159a5779fb77624faf4087 /libempathy-gtk/empathy-roster-item.c | |
parent | f25c42cb2412ceb7d0c5374fc8ce4918c01a6a53 (diff) | |
download | gsoc2013-empathy-1a11cdd2f0e8ee312d0857db9a12da416f0adce9.tar gsoc2013-empathy-1a11cdd2f0e8ee312d0857db9a12da416f0adce9.tar.gz gsoc2013-empathy-1a11cdd2f0e8ee312d0857db9a12da416f0adce9.tar.bz2 gsoc2013-empathy-1a11cdd2f0e8ee312d0857db9a12da416f0adce9.tar.lz gsoc2013-empathy-1a11cdd2f0e8ee312d0857db9a12da416f0adce9.tar.xz gsoc2013-empathy-1a11cdd2f0e8ee312d0857db9a12da416f0adce9.tar.zst gsoc2013-empathy-1a11cdd2f0e8ee312d0857db9a12da416f0adce9.zip |
roster-item: add padding around the main box
Diffstat (limited to 'libempathy-gtk/empathy-roster-item.c')
-rw-r--r-- | libempathy-gtk/empathy-roster-item.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-roster-item.c b/libempathy-gtk/empathy-roster-item.c index 4a121bad7..0f6fc644b 100644 --- a/libempathy-gtk/empathy-roster-item.c +++ b/libempathy-gtk/empathy-roster-item.c @@ -9,7 +9,7 @@ #include <libempathy-gtk/empathy-images.h> #include <libempathy-gtk/empathy-ui-utils.h> -G_DEFINE_TYPE (EmpathyRosterItem, empathy_roster_item, GTK_TYPE_BOX) +G_DEFINE_TYPE (EmpathyRosterItem, empathy_roster_item, GTK_TYPE_ALIGNMENT) #define AVATAR_SIZE 48 @@ -295,7 +295,7 @@ empathy_roster_item_class_init ( static void empathy_roster_item_init (EmpathyRosterItem *self) { - GtkWidget *box, *first_line_box; + GtkWidget *main_box, *box, *first_line_box; GtkStyleContext *context; self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, @@ -303,10 +303,12 @@ empathy_roster_item_init (EmpathyRosterItem *self) gtk_widget_set_size_request (GTK_WIDGET (self), 300, 64); + main_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8); + /* Avatar */ self->priv->avatar = gtk_image_new (); - gtk_box_pack_start (GTK_BOX (self), self->priv->avatar, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (main_box), self->priv->avatar, FALSE, FALSE, 0); gtk_widget_show (self->priv->avatar); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); @@ -334,7 +336,7 @@ empathy_roster_item_init (EmpathyRosterItem *self) TRUE, TRUE, 0); gtk_widget_show (first_line_box); - gtk_box_pack_start (GTK_BOX (self), box, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (main_box), box, TRUE, TRUE, 0); gtk_widget_show (box); /* Presence */ @@ -348,9 +350,12 @@ empathy_roster_item_init (EmpathyRosterItem *self) /* Presence icon */ self->priv->presence_icon = gtk_image_new (); - gtk_box_pack_start (GTK_BOX (self), self->priv->presence_icon, + gtk_box_pack_start (GTK_BOX (main_box), self->priv->presence_icon, FALSE, FALSE, 0); gtk_widget_show (self->priv->presence_icon); + + gtk_container_add (GTK_CONTAINER (self), main_box); + gtk_widget_show (main_box); } GtkWidget * @@ -360,7 +365,10 @@ empathy_roster_item_new (FolksIndividual *individual) return g_object_new (EMPATHY_TYPE_ROSTER_ITEM, "individual", individual, - "spacing", 8, + "bottom-padding", 8, + "top-padding", 8, + "left-padding", 8, + "right-padding", 8, NULL); } |