constraints and size hints

Aaron J. Seigo aseigo at kde.org
Tue Feb 14 17:32:37 UTC 2012


On Tuesday, February 14, 2012 10:45:50 Ignat Semenov wrote:
> a)Do I need to set the size in constraintsEvent for the FormFactor change?

yes; the size hint is just a hint.

> b)Do I need to set a size in sizeHint if constraintsEvent already has a
> setMinimumSize?

it's just a hint, not a hard size.

> c)Why Is setMinimumSize required? Is it because the panel
> is trying to shrink the widget horizontally to the very minimum (if in a
> horizontal panel)?

pretty much.

what an applet needs is a minimum size (which change in relation to the height 
in Horizontal and width in Vertical form factors) and a prefered size hint. 
those two things tell the panel what is best (prefered size hint) and what is 
required (minimum). from there it figures out the best compromise possible.

> Now for some reason, the same code does not make Kickoff, the Tabbed version
> (which inherits popupApplet) behave identically, remaining narrow and tall
> in the panel. What is worse, it does not repaint on panel resize! There

whe it is an icon, it behaves just fine here. do you eman when the icon is not 
being shown but instead the whole tab widget is put into a panel?

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120214/44ab4daa/attachment.sig>


More information about the Plasma-devel mailing list