strange problem in using Gtk::IconView

非常奇怪的问题,在使用Gtk::IconView的时候遇到的。
假设model的数据重新刷新后,但和刷新前的数据相同,这时候IconView里的显示就会发生奇怪的现象,首先height边大,若再次刷新,则text会奇怪的显示(左对齐),而且text每行的长度很短,导致item的height被变相拉大。

Use Gtk::IconView to display some pdf’s thumbnail, and without any problem. But encounter a strange problem, the iconview item’s height will increase after a model’s update if the model’s content unchanged.
For e.g., I use a update() function to do the update thing:

refListModel->clear();
for(int i=0;i {
Gtk::TreeModel::Row row = *(refListModel->append());
row[columns.id] = t[i].id;
row[columns.name] = t[i].name;
row[columns.click] = t[i].click;
row[columns.uri]=t[i].uri;
row[columns.pixbuf]=get_pixbuf(t[i].uri);
}
in this function, if the refListModel’s content same as before refListModel->clear() function, the iconview will get this problem.
So I don’t know, is this problem related with gtkmm or gtk+, and is this a bug or a feature?

This entry was posted in Program and tagged , , . Bookmark the permalink.

One Response to strange problem in using Gtk::IconView

  1. wlx [微博 ] says:

    file it as a bug on bugzilla:
    http://bugzilla.gnome.org/show_bug.cgi?id=490391

    and confirm this problem is related with gtk+.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please copy the string Flpgjy to the field below:

以新浪微博帐号登录