:right-sidebar: True ClampLayout =================================================================== .. currentmodule:: gi.repository.Adw .. class:: ClampLayout(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.LayoutManager`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Orientable` :Constructors: :: ClampLayout(**properties) new() -> Gtk.LayoutManager Constructors ------------ .. rst-class:: interim-class .. class:: ClampLayout :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.LayoutManager Creates a new ``AdwClampLayout``. Methods ------- .. rst-class:: interim-class .. class:: ClampLayout :no-index: .. method:: get_maximum_size() -> int Gets the maximum size allocated to the children. .. method:: get_tightening_threshold() -> int Gets the size above which the children are clamped. .. method:: get_unit() -> ~gi.repository.Adw.LengthUnit Gets the length unit for maximum size and tightening threshold. .. versionadded:: 1.4 .. method:: set_maximum_size(maximum_size: int) -> None Sets the maximum size allocated to the children. It is the width if the layout is horizontal, or the height if it is vertical. :param maximum_size: the maximum size .. method:: set_tightening_threshold(tightening_threshold: int) -> None Sets the size above which the children are clamped. Starting from this size, the layout will tighten its grip on the children, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum size, the children will be allocated all the available size. If the threshold is greater than the maximum size to allocate to the children, they will be allocated the whole size up to the maximum. If the threshold is lower than the minimum size to allocate to the children, that size will be used as the tightening threshold. Effectively, tightening the grip on a child before it reaches its maximum size makes transitions to and from the maximum size smoother when resizing. :param tightening_threshold: the tightening threshold .. method:: set_unit(unit: ~gi.repository.Adw.LengthUnit) -> None Sets the length unit for maximum size and tightening threshold. Allows the sizes to vary depending on the text scale factor. .. versionadded:: 1.4 :param unit: the length unit Properties ---------- .. rst-class:: interim-class .. class:: ClampLayout :no-index: .. attribute:: props.maximum_size :type: int The maximum size to allocate to the children. It is the width if the layout is horizontal, or the height if it is vertical. .. attribute:: props.tightening_threshold :type: int The size above which the children are clamped. Starting from this size, the layout will tighten its grip on the children, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum size, the children will be allocated all the available size. If the threshold is greater than the maximum size to allocate to the children, they will be allocated the whole size up to the maximum. If the threshold is lower than the minimum size to allocate to the children, that size will be used as the tightening threshold. Effectively, tightening the grip on a child before it reaches its maximum size makes transitions to and from the maximum size smoother when resizing. .. attribute:: props.unit :type: ~gi.repository.Adw.LengthUnit The length unit for maximum size and tightening threshold. Allows the sizes to vary depending on the text scale factor. .. versionadded:: 1.4