[Panel-devel] Panel contentSize

Aaron J. Seigo aseigo at kde.org
Mon Nov 26 20:11:50 CET 2007


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.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071126/08a729e0/attachment-0001.pgp 


More information about the Panel-devel mailing list