ClampLayout


Object Hierarchy:

Adw.ClampLayout Adw.ClampLayout Adw.ClampLayout Gtk.LayoutManager Gtk.LayoutManager Gtk.LayoutManager->Adw.ClampLayout GLib.Object GLib.Object GLib.Object->Gtk.LayoutManager Gtk.Orientable Gtk.Orientable Gtk.Orientable->Adw.ClampLayout

Description:

[ CCode ( type_id = "adw_clamp_layout_get_type ()" ) ]
[ Version ( since = "1.0" ) ]
public sealed class ClampLayout : LayoutManager, Orientable

A layout manager constraining its children to a given size.

<picture> <source srcset="clamp-wide-dark.png" media="(prefers-color-scheme: dark)"> <img src="clamp-wide.png" alt="clamp-wide"> </picture> <picture> <source srcset="clamp-narrow-dark.png" media="(prefers-color-scheme: dark)"> <img src="clamp-narrow.png" alt="clamp-narrow"> </picture>

`AdwClampLayout` constraints the size of the widgets 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 children from their minimum to their maximum size is eased out for a smooth transition.

If a child requires more than the requested maximum size, it will be allocated the minimum size it can fit in instead.

Each child will get the style classes .large when it reached its maximum size, .small when it's allocated the full size, .medium in-between, or none if it hasn't been allocated yet.


Namespace: Adw
Package: libadwaita-1

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.LayoutManager
All known members inherited from class GLib.Object
All known members inherited from interface Gtk.Orientable



2022 vala-language.org