! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[GTK3] Icon view label missing ellipsis or not wrapping


Description Andre Miranda editbugs 2017-11-04 03:01:05 CET
Created attachment 7413 
Test script

I found a small regression while investigating bug 13960, the icon view used to be wrap file/folder labels, although it was already a bit clumsy and sometimes wouldn't break words, now it doesn't wrap nor ellipsizes. The attached script should be useful for testing.
Comment 1 Andre Miranda editbugs 2017-11-04 03:01:30 CET
Created attachment 7414 
thunar-gtk2 screenshot
Comment 2 Andre Miranda editbugs 2017-11-04 03:03:21 CET
Created attachment 7415 
thunar-gtk3 screenshot
Comment 3 devicenull2009 2017-11-20 07:17:57 CET
Same problem for me on Fedora 27 (recent upgrade)

Kernel: 4.13.12-300.fc27.x86_64


Comment 4 alexxcons editbugs 2018-03-03 23:33:14 CET
For thunar 1.6.x, there is a patch available here: bug 12126.

For thunar master/gtk3, things are different.
While moving to gtk3 Jonas Kümmerlin removed the complete thunar-text-renderer in commit 81e645d8faaab8c91f6b6b907f1667052a760a76 and replaced it by GtkCellRendererText. ( Thats why the patch of  bug 12126 does not work for master )

For GtkCellRendererText it seems not to be possible to pass "wrap-mode" and "ellipsize" together in a meaningful way. As soon as "ellipsize" is passed, the text is not wrapped any more, but directly ellipsized.

According to https://wiki.gnome.org/HowDoI/Labels one needs to adjust gtk_label_set_lines as well to have both in parallel. Not sure where this can be done. Maybe somewhere in exo.

Nemo has a nice implementation on that. Label is wrapped to 3 lines, ellipsized if longer. Hover on the item shows full label.
Comment 5 alexxcons editbugs 2018-03-11 22:00:51 CET
Nautilus as well uses GtkCellRendererText, and it seems to succeed in using PANGO_ELLIPSIZE_END together with some kind of line-wrap.
As far as I can tell, a line of interest is this one:

However with just using the same configuration for the thunar GtkCellRendererText ( thunar_icon_view_init ) , I cannot fix things. Seems like something else is missing regarding the line-wrap ... search ongoing.
Comment 6 alexxcons editbugs 2018-04-21 22:56:10 CEST
Here a simple example for playing with GtkCellRendererText can be found:
Comment 7 Andre Miranda editbugs 2018-05-05 21:35:10 CEST
Created attachment 7714 

Revisiting this bug, to my surprise I can't reproduce the previous behavior.
It's not as nice as Nemo and Nautilus that limit filenames to 3 lines and expose them on selection, but it's not too bad either as before. Probably gtk or pango have changed since then.
I can't say this is a regression anymore, although there's room for improvement.
Comment 8 Andre Miranda editbugs 2018-05-05 22:45:19 CEST
Closing this bug.
There's already bug 12126 requesting to truncate filename for Icon and Compact views

Bug #13973

Reported by:
Andre Miranda
Reported on: 2017-11-04
Last modified on: 2018-05-05


Xfce Bug Triage
CC List:
4 users



Test script (189 bytes, application/x-shellscript)
2017-11-04 03:01 CET , Andre Miranda
no flags
thunar-gtk2 screenshot (58.17 KB, image/png)
2017-11-04 03:01 CET , Andre Miranda
no flags
thunar-gtk3 screenshot (54.65 KB, image/png)
2017-11-04 03:03 CET , Andre Miranda
no flags
thunar-now (44.06 KB, image/png)
2018-05-05 21:35 CEST , Andre Miranda
no flags

Additional information