Re: [PATCH] Improve icon container size calculation



Am Montag, den 27.02.2006, 15:12 +0100 schrieb Alexander Larsson:
> On Wed, 2006-02-22 at 23:35 +0100, Christian Neumair wrote:
> > The attached patch is meant to fix issues where the offset of the icons
> > wrt the visible icon container border vary based on the panel width.
> > This patch isn't tested too well but it is obvious that the old logic
> > was wrong, i.e. pixel sizes were added to canvas unit sizes.
> 
> I don't think this patch is completely right: (...)

Thanks for having noticed the two offset glitches in the patch.

> I commited the attached patch. I verified that it at lest fixed the top
> icon moving wrongly when using != 100% default zoom and changing the
> size of the top panel.
> 
> > The original motivation was that I hoped to be able to easily fix the
> > problems reported by Martin where icons randomly jumped around
> > (reproducible when pressing ctrl-R).
> 
> Does this still happen with federicos patch applied. I'm a bit confused
> about the various icon positioning issues atm.

Yes, it still happens. We align the semi-positioned icons according to
the grid, and the grid width is fixed while the icon width on the
desktop isn't really predictable. In normal folders, we can gracefully
relayout when a big icon appears, but for the desktop this isn't really
doable.

I've GIMPed an (attached) illustration of the issue. Without having a
fixed grid width, I think it will be very hard to fix.

Note that it only occurs to semi-positioned icons, because fully
positioned icons are never checked against grid collitions.

> > b) replace the NAUTILUS_IS_DESKTOP_ICON_FILE check in
> > fm_icon_view_add_file with has_volume || has_drive. I think that's how I
> > wrote it originally. Alex, was this modified to not break computer:///?
> > Maybe we should just pass FALSE for ordinary icon views and override the
> > _add handler in fm-desktop-icon-view.c, adding extra volume/drive
> > checks. I still think we'd have issues with network mounts that are
> > close to other icons.
> 
> I'm not sure how this is related to the jumping around, but isn't
> IS_DESKTOP_ICON better, since it only additionally handles things like
> the home icon and the trash that can be turned on and off.

Well, using IS_DESKTOP_ICON makes the home icon a prominent victim of
this issue, because it will almost always overlap with grid positions of
other icons due to its top-left position.

I think you typically don't want to have your remote volumes jumping
around, i.e. semi-positioned either. Without fundamentally modifying the
grid, I can't think of any solution except for checking whether an icon
has a volume, and that volume has a drive, since the code was added for
handling drive-bound removable media in the first place.

-- 
Christian Neumair <chris gnome-de org>

Attachment: nautilus-grid-issue.png
Description: PNG image



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