Size Fitter#

class UI.SizeFitter#

Sizes a panel to fit what it contains, rather than the other way round. See UI.Panel.size_fitter.

horizontal_fit: UI.ContentSizeFit#

How the width of the panel is chosen.

Attribute:

Can be read or written

Return type:

UI.ContentSizeFit

vertical_fit: UI.ContentSizeFit#

How the height of the panel is chosen.

Attribute:

Can be read or written

Return type:

UI.ContentSizeFit

class UI.ContentSizeFit#

How a size fitter sizes a panel along one direction.

unconstrained#

Leave the size alone.

min_size#

Use the smallest size the contents will fit in.

preferred_size#

Use the size the contents ask for.