understanding minimum/maximum/preferredSize in plasma context
Aaron J. Seigo
aseigo at kde.org
Sat Dec 27 07:31:22 CET 2008
On Friday 26 December 2008, Marcos Dione wrote:
> hi all. I'm set to get the panel spacer to its previous behaviour
> when set to auto stretch, that is, to use as much space as possible.
this applet is the right code in the wrong place. the panel ought to have an
expander in its layout by default; the item should not be an applet at all
imho but an item in the panel containment itself.
> with this code and in my config the spacer takes some 130px, while
> the systray takes 490px having only 190px of icons inside, and the 3
> digital clocks arte wider that needed[2]. if I turn off that auto
> stretching, it goes down to the original 16px, but if I use the slider
> to effectively increase the minSize, it goes up to 710px.
this is probably because all these applets stretch to whatever the max size is
if there is nothing else there. try checking their preferredSize()s
> either reinventing the layout code that already exists in QT or the
if you read the code, you'll see that that's not the case.
> applets are not behaving as they should.
perhaps.
> also, and finishind this longish mail, wehre does the preferredSize
> come from?
it is set by the item (e.g. applet)
> is it calculated? and last but not least, is there really
> pretty pretty please some docs about this, including how
> constraintsEvent() works/should work?
the only connection between constraintsEvents and sizing is that you may want
to adjust the size on FormFactorConstraint or recalculate on
SizeConstraintEvent (but be careful in that case not to create infinite loops)
--
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 Qt Software
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20081226/02e8c316/attachment-0001.sig
More information about the Plasma-devel
mailing list