]> Pileus Git - ~andy/gtk/commitdiff
gtk: Centre the text under the icon in GtkIconView
authorBastien Nocera <hadess@hadess.net>
Thu, 2 Dec 2010 14:52:22 +0000 (14:52 +0000)
committerBastien Nocera <hadess@hadess.net>
Thu, 2 Dec 2010 15:04:32 +0000 (15:04 +0000)
No point in setting the alignment to centre if we don't center it
within the cell itself.

gtk/gtkiconview.c

index 8a3defdb80ea61e56e0c161dddb7e0ed0ecbca25..17ce6af25b2c0f819c13bd59804d95ce692fb212 100644 (file)
@@ -5618,7 +5618,7 @@ update_text_cell (GtkIconView *icon_view)
        g_object_set (info->cell,
                       "alignment", PANGO_ALIGN_CENTER,
                      "wrap-mode", PANGO_WRAP_WORD_CHAR,
-                     "xalign", 0.0,
+                     "xalign", 0.5,
                      "yalign", 0.0,
                      NULL);
       else
@@ -5626,7 +5626,7 @@ update_text_cell (GtkIconView *icon_view)
                       "alignment", PANGO_ALIGN_LEFT,
                      "wrap-mode", PANGO_WRAP_WORD_CHAR,
                      "xalign", 0.0,
-                     "yalign", 0.0,
+                     "yalign", 0.5,
                      NULL);
     }
 }