[Panel-devel] Panel contentSize

Sébastien Le Ray beuss at tuxfamily.org
Sun Dec 2 10:20:28 CET 2007


Le Mon, 26 Nov 2007 12:11:50 -0700,
"Aaron J. Seigo" <aseigo at kde.org> a écrit :

> On Monday 26 November 2007, Sébastien Le Ray wrote:
> > > 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 ?
> 
> no, you should be using Applet::size(). don't try and figure out how
> big your applet should be based on the panel, etc. let the layout
> manage that for you and adjust your content accordingly to whatever
> size your applet is. there is the ability to set expanding direction
> preferenes, minimum size hints and there is also a size change
> constraint that results in calls to constraintsUpdated as well.
> 
> those things should give you all the information you need.
> 

How do I know what is my new size when constraintUpdated is called?
Shouldn't I use containtment().contentSize()?
-------------- 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/20071202/bc54f112/attachment.pgp 


More information about the Panel-devel mailing list