Re: [PATCH] Fix canvas item bounds calculation



Am Mittwoch, den 15.02.2006, 21:31 +0100 schrieb Martin Wehner:
> On Sat, 2005-11-12 at 13:44 +0100, Christian Neumair wrote:
> > The attached patch fixes various glitches, inter alia problems with
> > icons drags of icons containing emblems which are not totally inside the
> > icon rect, drawing artefacts after moving icons with zoom levels !=
> > 100%, and hit box problems with zoom levels != 100%.
> 
> I looked into a regression with the icon layout code and this patch
> turns out to be the culprit. It actually breaks the emblem bounds
> calculation: Create two files in the icon view and give both an emblem.
> Then zoom < 100%. There'll be a huge gap between the icons as the emblem
> rectangle gets larger and larger (it's divided by a value < 1 after all)
> as the zoom level decreases.
> I don't think bringing pixels_per_unit into play at that point is right
> at all but even if the calculation would be correct, it'd have to go
> into update_bounds() too.
> 
> We'll have to revert that patch and try to find the real emblem drawing
> bug (#104235), its symptoms were just masked by this change.

I fail to reproduce this both on the desktop and in directories. The
assigned emblems seem to scale totally fine.
I still think the patch does the correct thing, because
nautilus_icon_canvas_item_bounds wants its result in canvas units, and
emblem_layout_next returns screen units, so we just convert the result
of emblem_layout_next into canvas units by dividing it by
pixels_per_unit.

Maybe the problems are caused by recent icon theme changes, i.e. the
attach position in the "*.icon" files is stored in absolute pixels, but
IIRC the icon (and emblem?) sizes are slightly different with Tango.

-- 
Christian Neumair <chris gnome-de org>

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



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