[gnome-chat] contacts-list-dialog: Fix the alignment of the row elements



commit eb62c16908cde58a9762e8d6e6a3b4a3e9a47b93
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Sep 13 15:51:40 2013 +0200

    contacts-list-dialog: Fix the alignment of the row elements

 src/chat-contacts-list-dialog.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/chat-contacts-list-dialog.c b/src/chat-contacts-list-dialog.c
index 1d1bdde..be6402d 100644
--- a/src/chat-contacts-list-dialog.c
+++ b/src/chat-contacts-list-dialog.c
@@ -122,16 +122,18 @@ chat_contacts_list_dialog_add_row_avatar (GObject *source_object, GAsyncResult *
   row = gtk_list_box_row_new ();
   g_object_set_data_full (G_OBJECT (row), "chat-contact", g_strdup (alias), (GDestroyNotify) g_free);
   grid = gtk_grid_new ();
-  gtk_widget_set_hexpand (grid, TRUE);
   gtk_container_set_border_width (GTK_CONTAINER (grid), 6);
   gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), GTK_ORIENTATION_HORIZONTAL);
   gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
   gtk_container_add (GTK_CONTAINER (row), grid);
   gtk_container_add (GTK_CONTAINER (priv->list_box), row);
 
+  gtk_widget_set_hexpand (image, FALSE);
   gtk_container_add (GTK_CONTAINER (grid), image);
 
   label = gtk_label_new (alias);
+  gtk_widget_set_halign (label, GTK_ALIGN_START);
+  gtk_widget_set_hexpand (label, TRUE);
   gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
   gtk_container_add (GTK_CONTAINER (grid), label);
 
@@ -139,6 +141,7 @@ chat_contacts_list_dialog_add_row_avatar (GObject *source_object, GAsyncResult *
   if (state)
     {
       image = gtk_image_new_from_icon_name (state, GTK_ICON_SIZE_BUTTON);
+      gtk_widget_set_hexpand (image, FALSE);
       gtk_container_add (GTK_CONTAINER (grid), image);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]