[empathy] roster-contact: some sizing fixes
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] roster-contact: some sizing fixes
- Date: Thu, 14 Jun 2012 07:50:43 +0000 (UTC)
commit 4e7a495826259c861506acfe87a376b51d450643
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Jun 4 16:13:37 2012 +0200
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 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-roster-contact.c b/libempathy-gtk/empathy-roster-contact.c
index 3025adb..ef3d9ec 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]