Created attachment 9113 clicking-dead-region.png There is a two pixels dead region between icon and filename in icon view. See the attached picture (highlighted in red). So basically "clicking the file" sometimes does nothing. Steps to reproduce 1) open thunar in icon view 2) try to click the region between filename and the icon
Thanks for reporting ! Possibly a theme-specific bug. I can reproduce it with greybird and Icon View selected .. I was not able to reproduce in compact view. The widget providing the thunar-view is the "ExoIconView", so I will move the bug to Exo.
Compact view is ok. I doubt it is theme specific, I can reproduce it also with Highcontrast theme. Again 2 pixels.
I am seeing this in Nemo also.
This bug is not new. Just tried xubuntu 18.04, i.e. xfce 4.12, and can reproduce it there - two pixel gap.
Delving into the code, there is a "spacing" variable in exo/exo-icon-view.c in struct _ExoIconViewPrivate https://git.xfce.org/xfce/exo/tree/exo/exo-icon-view.c#n552 It is set to zero, afaict (in fact it seems uninitialized). If I increase its value icon_view->priv->spacing = 16; in exo_icon_view_init(...), the gap increases. But I am unable to close the gap with spacing=0. The two pixels always remain.
Couple of remarks after discussion with Theo over irc: - xfdesktop (icons on the desktop) does not suffer from this - in Nautilus (gnome file manager) there is no such gap - the gap does not depend on the zoom level - it is always 2 pixels
Created attachment 9137 exo-patch.p The following patch works for me. Visually, nothing changes - its pixel-to-pixel as before the patch. But functionally, the unclickable gap is gone. Also improves clicking horizontally - before the patch, the rightmost pixel of "example" label was unclickable.
I can confirm that the patch works.
After some more research, I now think my patch (attachment 9137 ) is not the right way how to remedy this. The cause of the gap is simply padding - it is set to 3 pixels in thunar/thunar-icon-view.c g_object_set (G_OBJECT (THUNAR_STANDARD_VIEW (icon_view)->icon_renderer), "ypad", 3u, NULL); https://git.xfce.org/xfce/thunar/tree/thunar/thunar-icon-view.c#n101 Change the "3u" to "0u", recompile thunar and voila - the gap is gone. This time, though, also visually. But I would be all for this change - I do not miss the three pixels, they do not scale with zoom level anyway and it would make the code less readable to make them clickable (imo). If you are wondering why 3u leads to only 2 pixel unclickable gap (and it is really two pixels, not three), the reason lies in the function exo_icon_view_get_item_at_coords in exo/exo-icon-view.c. The inequalities there should be "<" instead of "<=". The extra "=" brings the extra pixel (I verified this experimentally). https://git.xfce.org/xfce/exo/tree/exo/exo-icon-view.c#n4359 and also lines 4360, 4373, 4374
Created attachment 9178 0001-Remove-the-vertical-gap-between-icon-and-its-label.patch The patch for thunar, bringing the gap to zero.
Adam Purkrt referenced this bugreport in commit f35be6fd1b138a70f0e4d5003df6539c9cdceed7 Remove the vertical gap between icon and its label (Bug #16041) https://git.xfce.org/xfce/thunar/commit?id=f35be6fd1b138a70f0e4d5003df6539c9cdceed7
Adam Purkrt referenced this bugreport in commit a9a779d352ca85c5fa087175ecd593e78edf7b16 Remove the vertical gap between icon and its label (Bug #16041) https://git.xfce.org/xfce/thunar/commit?id=a9a779d352ca85c5fa087175ecd593e78edf7b16
Looks reasonable to me, and as well seems to fix the bug, thanks alot ! Pushed to master and 4.14 branch. Possibly worth to provide as well a fix for the wrong pixel in exo_icon_view_get_item_at_coords if it should matter somewhere ? (If so, I guess a new bug would be good)
Should we also apply the exo patch, or is the thunar patch sufficient?
Created attachment 9217 no-visual-gap.png Eh, my fix introduced ugliness when the icon is full size vertically (.pdf thumbnail for example). The visual gap is missing - see the attached file. More sophisticated fix is needed that would keep the visual gap - preferably not 3 pixels fixed, but scalable with zoom.
Adam, would setting the value to "1u" help (no unclickable gap still)?
Created attachment 9604 patch
Theo Linkspfeifer referenced this bugreport in commit 743be8c2aae0f118624907920c9c0cfe37b61384 Increase vertical gap between icon and its label slightly (Bug #16041) https://git.xfce.org/xfce/thunar/commit?id=743be8c2aae0f118624907920c9c0cfe37b61384
Theo Linkspfeifer referenced this bugreport in commit 7959c91613dc20c829e36ff14ec60ff901462d3c Increase vertical gap between icon and its label slightly (Bug #16041) https://git.xfce.org/xfce/thunar/commit?id=7959c91613dc20c829e36ff14ec60ff901462d3c
Works fine for me .. adds a minimal gap, and is still clickable. Well done, Theo ! Pushed to master and 4.14