Re: [PATCH] Desktop Icons with "Keep Aligned"



On Sat, 2010-01-16 at 14:12 -0500, Bill Smith wrote:
> Hi,
> 
> As explained in a number of bug reports (~9 on bugzilla), desktop icon
> alignment doesn't seem to work exactly right, or at least in a way
> that is intuitive. My proposed fix is attached at
> https://bugzilla.gnome.org/show_bug.cgi?id=601469 as well as to this
> email.
> 
> I did some experimenting with grid spacing and found that higher
> SNAP_SIZE_X / Y values make a better-looking grid. Similar patches
> appear in some bug reports, but it appears none have been committed
> yet. Ideally, I think grid spacing should be user-configurable in
> gconf keys, and it appears
> https://bugzilla.gnome.org/show_bug.cgi?id=530430 contains a possible
> patch for this.

While I agree that in some cases the original snap values are to small
I'm not sure just bumping them is the ideal solution. 

There are a few issues I see, first of all it doesn't take into account
a different zoom factor. If you change the default zoom to 50% then your
values are to large.

Secondly, the large snap factor gives a lot of whitespace, meaning a lot
less icons will be visible:
http://www.gnome.org/~alexl/snap-to-sizes.png
This is the top left corner of my desktop after clean up by name. Left
is with your snap sizes, right is with original sizes.

Third, with multiple size icons in the same layout (stretched,
thumbnails, normal icons) increasing the snap size is risky as if some
icon is accidentally a tiny amount larger than the snap size we almost
double the size used for that icon. This can create large holes in the
layout.

> The other issue I addressed was how icons can "stack" on each other. I
> found that using schedule_align_icons() in icon_set_position() makes
> everything align strictly to the grid. This change also fixes other
> issues like unaligned icons that are newly created or dragged from
> another window. I would appreciate any comments on this.

This isn' right. icon_set_position is the really lowlevel positioning
function. The code tries to handle keep_aligned before changing the
position, obviously we're missing it somewhere, but forcing snapping
always (even after e.g. a relayout which uses icon_set_position()) isn't
the right solution. 

In fact, isn't there a risk of infinite loops since align_icons() calls
icon_set_position().


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl redhat com            alexander larsson gmail com 
He's a fast talking alcoholic shaman with a secret. She's a vivacious 
red-headed Hell's Angel with an MBA from Harvard. They fight crime! 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]