From 4e7a495826259c861506acfe87a376b51d450643 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 4 Jun 2012 16:13:37 +0200 Subject: roster-contact: some sizing fixes - Don't force a minimal size - Ellipsize the labels so they don't enlarge the window - Make sure the label is always aligned on the left (needed when it's wrapped) --- libempathy-gtk/empathy-roster-contact.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-roster-contact.c b/libempathy-gtk/empathy-roster-contact.c index 3025adb4b..ef3d9ec79 100644 --- a/libempathy-gtk/empathy-roster-contact.c +++ b/libempathy-gtk/empathy-roster-contact.c @@ -385,8 +385,6 @@ empathy_roster_contact_init (EmpathyRosterContact *self) self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, EMPATHY_TYPE_ROSTER_CONTACT, EmpathyRosterContactPriv); - gtk_widget_set_size_request (GTK_WIDGET (self), 300, -1); - main_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8); /* Avatar */ @@ -402,8 +400,10 @@ empathy_roster_contact_init (EmpathyRosterContact *self) first_line_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); self->priv->alias = gtk_label_new (NULL); + gtk_label_set_ellipsize (GTK_LABEL (self->priv->alias), PANGO_ELLIPSIZE_END); gtk_box_pack_start (GTK_BOX (first_line_box), self->priv->alias, FALSE, FALSE, 0); + gtk_misc_set_alignment (GTK_MISC (self->priv->alias), 0, 0.5); gtk_widget_show (self->priv->alias); self->priv->phone_icon = gtk_image_new_from_icon_name ("phone-symbolic", @@ -425,6 +425,8 @@ empathy_roster_contact_init (EmpathyRosterContact *self) /* Presence */ self->priv->presence_msg = gtk_label_new (NULL); + gtk_label_set_ellipsize (GTK_LABEL (self->priv->presence_msg), + PANGO_ELLIPSIZE_END); gtk_box_pack_start (GTK_BOX (box), self->priv->presence_msg, TRUE, TRUE, 0); gtk_widget_show (self->priv->presence_msg); -- cgit v1.2.3