Re: [PATCH] Fix icon container margins



Am Freitag, den 30.09.2005, 16:10 +0200 schrieb Alexander Larsson:
> On Fri, 2005-09-30 at 11:27 +0200, Christian Neumair wrote:
> > While we treat the margins of the icon container in canvas units, we set
> > them in pixel units. Use a big panel and you'll note that it overlaps
> > the icons on the top, as reported by bug 149847 [1].
> > 
> > Proposed patch attached.
> 
> Thats not right. Some places treat the margins as canvas units already

I wasn't aware of these horrible inconsistencies, sorry.

> Furthermore, the margins should be in pixels, since they are in pixels.
> When the zoom changes the margin in pixels doesn't change, but the
> margin in canvas units does.

Oh, that's what these obscure canvas units are all about :D. I didn't
closely investigate it and thought this would just be some obscure
factor like the PANGO 1024 #define.

> A better fix would be to always correctly treat ->*_margin as in pixel
> coordinates.

Surprisingly, that doesn't fix it. The icons are now layed out extremely
tight to the canvas top-left edge.
The whole icon container code is quiet confusing, and a mixture of
#defines and externally set margins. The layout code for instance does
not do x+=left_margin and y+=top_margin before laying out, resulting in
a top-left layout with double right/bottom margins. Also,
lay_down_icons_tblr is extremely tied to the desktop, which is reflected
by DESKTOP_PAD_HORIZONTAL and DESKTOP_PAD_VERTICAL defines it contains.
The bitrotten icon container really deserves an in-depth investigation.
-- 
Christian Neumair <chris gnome-de org>

Attachment: signature.asc
Description: This is a digitally signed message part



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