GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Sep 23, 2014 10:25 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: GtkIconView displays differently between different versions
PostPosted: Tue Jan 01, 2013 6:11 pm 
Offline

Joined: Tue Jan 01, 2013 5:53 pm
Posts: 3
Hi,
on Fedora 17 or Ubuntu 12.10/13.04 (GTK v3.6) my Iconview with column text is displayed like this:

Image

**note the excess spacing between icons**

on LMDE & Ubuntu 12.04 (GTK v3.4.2) it is displayed correctly like this:

Image

Why? - how do I get the it to display like in the older GTK version?

If I remove the text_column (set it to a value of -1) then both GTKv3.6 and GTKv3.4.2 displays exactly the same (correctly) with no excess spacing.

Thanks in advance

Python code:

Code:
#!/usr/bin/env python

from gi.repository import Gtk, GdkPixbuf

window = Gtk.Window()
window.connect('delete_event', Gtk.main_quit)

ui = Gtk.Builder()
ui.add_from_file('ui/reproduce.ui')

page = ui.get_object('main_box')
window.add(page)

ls = Gtk.ListStore(str, GdkPixbuf.Pixbuf)
icon = GdkPixbuf.Pixbuf.new_from_file_at_size(
    str("/usr/share/icons/gnome/48x48/actions/zoom-out.png"), 90, 90)

for i in range(15):
    ls.append(['Item %d' % i, icon])

covers_view = ui.get_object('covers_view')
covers_view.set_model(ls)
covers_view.set_text_column(0)
covers_view.set_pixbuf_column(1)
covers_view.set_item_width(100)

window.set_default_size(600,400)
window.show_all()
Gtk.main()


Glade file:

http://pastebin.com/uvQ9mWeg


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group