Re: [PATCH] Fix icon container margins



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,
for instance:

/* Lay out icons a line at a time. */
canvas_width = (GTK_WIDGET (container)->allocation.width
		- container->details->left_margin
		- container->details->right_margin)
	/ EEL_CANVAS (container)->pixels_per_unit;
canvas_height = (GTK_WIDGET (container)->allocation.height
		 - container->details->top_margin
		 - container->details->bottom_margin) 
       / EEL_CANVAS (container)->pixels_per_unit;

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.

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

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a suave devious waffle chef on the hunt for the last specimen of a great 
and near-mythical creature. She's an elegant gold-digging college professor 
descended from a line of powerful witches. They fight crime! 




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