Clamp
A widget constraining its child to a given size.
The AdwClamp
widget constrains the size of the widget it contains to a given maximum size. It will constrain the width if it is horizontal, or the height if it is vertical. The expansion of the child from its minimum to its maximum size is eased out for a smooth transition.
If the child requires more than the requested maximum size, it will be allocated the minimum size it can fit in instead.
AdwClamp
can scale with the text scale factor, use the property@Clamp:unit property to enable that behavior.
See also: class@ClampLayout, class@ClampScrollable.
CSS nodes
AdwClamp
has a single CSS node with name clamp
.
Constructors
Properties
The maximum size allocated to the child.
The size above which the child is clamped.
The length unit for maximum size and tightening threshold.
Functions
Gets the maximum size allocated to the child.
Gets the size above which the child is clamped.
Gets the length unit for maximum size and tightening threshold.
Sets the maximum size allocated to the child.
Sets the size above which the child is clamped.
Sets the length unit for maximum size and tightening threshold.