Function zng_wgt_size_offset::size

source ·
pub fn size(child: impl UiNode, size: impl IntoVar<Size>) -> impl UiNode
Expand description

P Exact size of the widget.

When set the widget is layout with exact size constraints, clamped by the contextual max. Relative size values are computed from the constraints maximum bounded size.

This property disables inline layout for the widget. This property sets the WIDGET_SIZE.

See also force_size to deliberately break layout and cause out-of-bounds rendering when the exact size cannot fit in the contextual min/max.

§width and height

You can use the width and height properties to only set the size of one dimension.