GNOME Bugzilla – Bug 153519
Grid fitted icons in the Desktop (first column) are too much to the left
Last modified: 2006-02-13 22:28:10 UTC
Please describe the problem: When you have the keep aligned option in nautilus, in the first column the icons are strictly glued to the left side of the screen. That makes the text of the text unreadable, as the text width is bigger than the width of the icon. The second column is really the first usable column to place the icons, but its too far away from the left border. Steps to reproduce: 1. Select keep aligned option 2. Place the icons in the first or the second column Actual results: Icons lie in unnatural positions Expected results: The icons in the first column should be a few pixels more to the right Does this happen every time? Yes Other information:
I see this too. It's a little annoying.
*** Bug 153512 has been marked as a duplicate of this bug. ***
*** Bug 163855 has been marked as a duplicate of this bug. ***
Bug 163855 has a screenshot showing the problem (attachment 35913 [details]).
*** Bug 163883 has been marked as a duplicate of this bug. ***
Bug 163883 also has a screenshot (attachment 35920 [details]).
In 2.10 this only happens to files with file names wider than the icon. If I create a file ttt.txt it will get properly aligned a file qwertyuiopasdfgh.txt will get flushed to the left.
This is really annoying. Any fix planned?
http://mail.gnome.org/archives/nautilus-list/2005-September/msg00211.html fixed the issue for me. Alex didn't like it, but still didn't comment on my reply. I'll further investigate it.
Ubuntu has a bug about this: http://bugzilla.ubuntu.com/show_bug.cgi?id=20147
Created attachment 57966 [details] [review] Proposed patch The attached patch fixes the issue for me. The first half of it is an unimportant cleanup, the second half is a slight modification. The problem was that Nautilus subtracted the icon's width from the column width instead of using half the snap size. As you can see in find_empty_location, the column width for tblr layout is assumed to be the snap size for subsequent columns. The onliest exception is the first layout (placed > 0 is not true) where the max_width is calculated.
*** Bug 326891 has been marked as a duplicate of this bug. ***
I don't think the patch is totally right. I think the right position to use is SNAP_WITH/2 - icon_width/2, so that we center the pixbuf in the snapped column. I commited something like this. It seems to work for me.
*** Bug 330910 has been marked as a duplicate of this bug. ***
Alex's patch from comment #13 indeed appears to work. I don't trust this very much: + x = DESKTOP_PAD_HORIZONTAL + (SNAP_SIZE_X / 2) - ((icon_rect.x1 - icon_rect.x0) / 2); What if this is a very wide icon, so that (icon_rect.x1 - icon_rect.x0) / 2 > the_padding_constants? I tried very wide filenames, and the bug doesn't happen; maybe it is because the code that draws the icons indeed constrains the width of the labels to something reasonable. But I don't know if this maximum label width is always constrained to match the constants above. Anyway - should we have this patch in the 2.12 branch as well?