[Panel-devel] Panel contentSize

Sébastien Le Ray beuss at tuxfamily.org
Mon Nov 26 12:32:30 CET 2007


Le Mon, 26 Nov 2007 03:06:42 -0700,
"Aaron J. Seigo" <aseigo at kde.org> a écrit :

> On Sunday 25 November 2007, Sébastien Le Ray wrote:
> > I'm playing with applets (mainly to have them adjusting their size
> > to the panel size when I set its height lower), but I've a problem
> > with contentSize. The returned size includes margins, which
> > shouldn't be the
> 
> which margins? the margins of the layout? the margins of the applet?
> because contentSize() does remove the standard background margins,
> but it doesn't remove the layout margins (which it shouldn't be).

Does the panel uses the standard background ? It calls a
"panel-background" SVG, does it have the same margin? I looked at the
code and it seems that this is not the case since panel code always
recomputes margins using its own background (as in
Panel::paintBackground). Maybe I'm wrong, and if it is the case I'm
sorry...

> 
> what are you wanting to do with the returned value of contentSize()
> exactly?
> 

Trying to fit an applet to the inner size of the panel (to avoid the
hardcoded 48 value everywhere)... Should I use the layout margins ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071126/66c9c591/attachment.pgp 


More information about the Panel-devel mailing list