Size Fitter#
SizeFitter
Sizes a panel to fit what it contains, rather than the other way round.
See GET /ui/panel/(id)/size-fitter.
A SizeFitter object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /ui/size-fitter/(id)/horizontal-fit#
How the width of the panel is chosen.
- Parameters:
id – The identifier of the SizeFitter object.
- Response JSON Object:
value (UI.ContentSizeFit)
- PUT /ui/size-fitter/(id)/horizontal-fit#
How the width of the panel is chosen.
- Parameters:
id – The identifier of the SizeFitter object.
- Request JSON Object:
value (UI.ContentSizeFit) – The new value.
- GET /ui/size-fitter/(id)/vertical-fit#
How the height of the panel is chosen.
- Parameters:
id – The identifier of the SizeFitter object.
- Response JSON Object:
value (UI.ContentSizeFit)
- PUT /ui/size-fitter/(id)/vertical-fit#
How the height of the panel is chosen.
- Parameters:
id – The identifier of the SizeFitter object.
- Request JSON Object:
value (UI.ContentSizeFit) – The new value.
ContentSizeFit
How a size fitter sizes a panel along one direction.
Passed and returned as the name of one of its values:
"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.