[gnome-video-arcade] Fix alignment icons in Players columns.



commit 4ba174d6a5f450096cc238c6e3d6db8c571300f9
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Apr 24 15:01:44 2011 -0400

    Fix alignment icons in Players columns.
    
    Append an empty pixbuf renderer to each Players column and let it expand
    and fill any remaining space, so the player icons are all left-aligned.

 src/gva-columns.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gva-columns.c b/src/gva-columns.c
index 741b25f..7c629bd 100644
--- a/src/gva-columns.c
+++ b/src/gva-columns.c
@@ -499,6 +499,7 @@ static GtkTreeViewColumn *
 columns_factory_input_players (GvaGameStoreColumn column_id)
 {
         GtkTreeViewColumn *column;
+        GtkCellRenderer *renderer;
         GdkPixbuf *pixbuf;
         gint ii;
 
@@ -511,8 +512,6 @@ columns_factory_input_players (GvaGameStoreColumn column_id)
 
         for (ii = 0; ii < MAX_PLAYER_ICONS; ii++)
         {
-                GtkCellRenderer *renderer;
-
                 renderer = gtk_cell_renderer_pixbuf_new ();
                 g_object_set (renderer, "pixbuf", pixbuf, NULL);
                 gtk_tree_view_column_pack_start (column, renderer, FALSE);
@@ -523,6 +522,10 @@ columns_factory_input_players (GvaGameStoreColumn column_id)
                         GINT_TO_POINTER (ii), NULL);
         }
 
+        /* Append an empty pixbuf renderer to fill leftover space. */
+        renderer = gtk_cell_renderer_pixbuf_new ();
+        gtk_tree_view_column_pack_start (column, renderer, TRUE);
+
         return column;
 }
 



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