[clocks] Fix item width in iconview bug: 678865



commit 9b92dce04b134e37064783a712fcdbbd3b6348b2
Author: Seif Lotfy <seif lotfy com>
Date:   Wed Jul 4 00:34:43 2012 +0200

    Fix item width in iconview bug: 678865

 clocks.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/clocks.py b/clocks.py
index 24d09ac..0f475fc 100644
--- a/clocks.py
+++ b/clocks.py
@@ -92,9 +92,13 @@ class World (Clock):
         iconview.set_model(liststore)
         iconview.set_spacing(3)
         iconview.set_pixbuf_column(0)
-        iconview.set_markup_column(1)
         iconview.get_style_context ().add_class ('grey-bg')
 
+        renderer_text = Gtk.CellRendererText()
+        renderer_text.set_alignment (0.5, 0.5)
+        iconview.pack_start(renderer_text, True)
+        iconview.add_attribute(renderer_text, "markup", 1)
+
         scrolledwindow = Gtk.ScrolledWindow()
         scrolledwindow.add(iconview)
         self.add(scrolledwindow)



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