GNOME Bugzilla – Bug 563999
GtkIconView icon labels are incorrently repositioning themselves when spacing is set
Last modified: 2018-02-10 04:36:51 UTC
Please describe the problem: I have a GtkIconView with several icons, and various positioning properties set, like: gtk_icon_view_set_item_width (GTK_ICON_VIEW (icon_view), 130); gtk_icon_view_set_spacing (GTK_ICON_VIEW (icon_view), 3); gtk_icon_view_set_row_spacing (GTK_ICON_VIEW (icon_view), 8); gtk_icon_view_set_column_spacing (GTK_ICON_VIEW (icon_view), 5); gtk_icon_view_set_margin (GTK_ICON_VIEW (icon_view), 10); Everything is positioned just fine. However, during runtime I change one of the icons' tooltip, and the labels suddenly become aligned to left. There are two problems here: 1. I only change the tooltip column contents, which shouldn't invoke repositioning. 2. The actual visually observed behaviour is obviously incorrect. Steps to reproduce: 1. Compile my test case. 2. Double-click the first icon. This changes the icon's tooltip column contents. Actual results: I see the incorrect label positioning. Expected results: 1. If I'm changing only tooltips, the repositioning obviously shouldn't happen. 2. Even if I'm changing the text, the label positions are wrong. Does this happen every time? Yes Other information:
Created attachment 124352 [details] Test case Double-click the first icon to see the effect.
I have the same behavior in an applicationt. I use the icon view to display the results of a search. When I perform a new search the results are displayed properly but if the next search returns the same results then the labels are shifted to the left. In my application performing a query that returns different results will fix the issue. This is until a query returns the same results as the previous one. This seems like a regression because my application started behaving this way after I upgraded my Linux distribution. I have a colleague that's using the same application unaltered (it's a Perl Gtk2 script) and he doesn't experience this quirks.
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.