adw.clamp
Module for [Clamp] class
Types 3
A widget constraining its child to a given size.
The adw.clamp.Clamp 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.
adw.clamp.Clamp can scale with the text scale factor, use the adw.clamp.Clamp.unit property to enable that behavior.
See also: adw.clamp_layout.ClampLayout, adw.clamp_scrollable.ClampScrollable.
CSS nodes
adw.clamp.Clamp has a single CSS node with name clamp.
ClampGidBuilder builder() static nothrowGet builder for [adw.clamp.Clamp] Returns: New builder objectgtk.widget.Widget child() @property nothrowGet `child` property. Returns: The child widget of the [adw.clamp.Clamp].void child(gtk.widget.Widget propval) @property nothrowSet `child` property. Params: propval = The child widget of the [adw.clamp.Clamp].int maximumSize() @property nothrowGet `maximumSize` property. Returns: The maximum size allocated to the child.void maximumSize(int propval) @property nothrowSet `maximumSize` property. Params: propval = The maximum size allocated to the child.int tighteningThreshold() @property nothrowGet `tighteningThreshold` property. Returns: The size above which the child is clamped.void tighteningThreshold(int propval) @property nothrowSet `tighteningThreshold` property. Params: propval = The size above which the child is clamped.adw.types.LengthUnit unit() @property nothrowGet `unit` property. Returns: The length unit for maximum size and tightening threshold.void unit(adw.types.LengthUnit propval) @property nothrowSet `unit` property. Params: propval = The length unit for maximum size and tightening threshold.gtk.widget.Widget getChild() nothrowGets the child widget of self. Returns: the child widget of selfint getMaximumSize() nothrowGets the maximum size allocated to the child. Returns: the maximum size to allocate to the childint getTighteningThreshold() nothrowGets the size above which the child is clamped. Returns: the size above which the child is clampedadw.types.LengthUnit getUnit() nothrowGets the length unit for maximum size and tightening threshold. Returns: the length unitvoid setTighteningThreshold(int tighteningThreshold) nothrowSets the size above which the child is clamped.void setUnit(adw.types.LengthUnit unit) nothrowSets the length unit for maximum size and tightening threshold.Fluent builder implementation template for adw.clamp.Clamp
T child(gtk.widget.Widget propval) nothrowSet `child` property. Params: propval = The child widget of the [adw.clamp.Clamp]. Returns: Builder instance for fluent chainingT maximumSize(int propval) nothrowSet `maximumSize` property. Params: propval = The maximum size allocated to the child.T tighteningThreshold(int propval) nothrowSet `tighteningThreshold` property. Params: propval = The size above which the child is clamped.T unit(adw.types.LengthUnit propval) nothrowSet `unit` property. Params: propval = The length unit for maximum size and tightening threshold.Fluent builder for adw.clamp.Clamp