[gtk+] gtk: Centre the text under the icon in GtkIconView



commit 66122b369e06d517fb5e8a9a7dd3002f3fc660ac
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Dec 2 14:52:22 2010 +0000

    gtk: Centre the text under the icon in GtkIconView
    
    No point in setting the alignment to centre if we don't center it
    within the cell itself.

 gtk/gtkiconview.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 8a3defd..17ce6af 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -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);
     }
 }



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