Size Enum

Specifies the sizing behavior of a widget, allowing for flexible layout arrangements.

Variant NameAssociated Data
FillNone
Fixedf64
FitNone
AllNone

The Size enum facilitates various sizing strategies, such as:

  • Fill: filling available space
  • Fixed: setting a fixed dimension
  • Fit: adjusting to content
  • All: a special mode that applies a unique sizing logic

Example

#![allow(unused)]
fn main() {
height: Fill,
width: Fit,
width: 64.0,
width: All,
}