Clamp

class Clamp(pointer: <Error class: unknown class><<Error class: unknown class>>)

A widget constraining its child to a given size.

clamp-wide clamp-narrow

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

Link copied to clipboard
constructor()

Creates a new AdwClamp.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val adwClampPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
var child: <Error class: unknown class>?

The child widget of the AdwClamp.

Link copied to clipboard
open val gtkAccessiblePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkBuildablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkConstraintTargetPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkOrientablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
var maximumSize: <Error class: unknown class>

The maximum size allocated to the child.

Link copied to clipboard
var tighteningThreshold: <Error class: unknown class>

The size above which the child is clamped.

Link copied to clipboard

The length unit for maximum size and tightening threshold.