Class

AdwClamp

Description [src]

final class Adw.Clamp : Gtk.Widget {
  /* No available fields */
}

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 AdwClampLayout:unit property to enable that behavior.

CSS nodes

AdwClamp has a single CSS node with name clamp.

Ancestors

  • GtkWidget
  • GInitiallyUnowned
  • GObject

Implements

  • GtkAccessible
  • GtkBuildable
  • GtkConstraintTarget
  • GtkOrientable

Constructors

adw_clamp_new

Creates a new AdwClamp.

Instance methods

adw_clamp_get_child

Gets the child widget of self.

adw_clamp_get_maximum_size

Gets the maximum size allocated to the child.

adw_clamp_get_tightening_threshold

Gets the size above which the child is clamped.

adw_clamp_get_unit

Gets the length unit for maximum size and tightening threshold.

Available since: 1.4

adw_clamp_set_child

Sets the child widget of self.

adw_clamp_set_maximum_size

Sets the maximum size allocated to the child.

adw_clamp_set_tightening_threshold

Sets the size above which the child is clamped.

adw_clamp_set_unit

Sets the length unit for maximum size and tightening threshold.

Available since: 1.4

Properties

Adw.Clamp:child

The child widget of the AdwClamp.

Adw.Clamp:maximum-size

The maximum size allocated to the child.

Adw.Clamp:tightening-threshold

The size above which the child is clamped.

Adw.Clamp:unit

The length unit for maximum size and tightening threshold.

Available since: 1.4

Class structure

struct AdwClampClass {
  GtkWidgetClass parent_class;
  
}
Class members
parent_class
GtkWidgetClass
  No description available.