pub struct LayoutStyle {Show 17 fields
pub axis: Option<Axis>,
pub spacing: f32,
pub padding: Insets,
pub align: Align,
pub justify: Justify,
pub width: Option<f32>,
pub height: Option<f32>,
pub min_width: Option<f32>,
pub min_height: Option<f32>,
pub max_width: Option<f32>,
pub grow: f32,
pub align_self: Option<Align>,
pub overflow_hidden: bool,
pub grid_columns: Option<u16>,
pub wrap: bool,
pub aspect_ratio: Option<f32>,
pub absolute: Option<(f32, f32)>,
}Expand description
The box model a widget asks for. axis: None makes a leaf.
Fields§
§axis: Option<Axis>Stack direction, or None for a leaf.
spacing: f32Gap between consecutive children, in logical pixels.
padding: InsetsInner padding, in logical pixels.
align: AlignCross-axis alignment of children.
justify: JustifyMain-axis distribution of children.
width: Option<f32>Fixed width in logical pixels; None sizes to content.
height: Option<f32>Fixed height in logical pixels; None sizes to content.
min_width: Option<f32>Minimum width in logical pixels.
min_height: Option<f32>Minimum height in logical pixels.
max_width: Option<f32>Maximum width in logical pixels.
grow: f32Share of free main-axis space this box takes inside its parent stack.
align_self: Option<Align>Overrides the parent’s cross-axis alignment for this box.
Content may overflow this box (it scrolls or clips): the box does not grow to fit its content.
grid_columns: Option<u16>Lays children out in this many equal-width grid columns instead of a stack.
wrap: boolChildren move to a new line when they do not fit (flex-wrap).
aspect_ratio: Option<f32>Width divided by height; with one dimension known, the other follows.
absolute: Option<(f32, f32)>Takes the box out of the flow and places it at this (x, y) offset
from its parent’s top-left corner (design surfaces, diagrams, canvases).
Implementations§
Trait Implementations§
Source§impl Clone for LayoutStyle
impl Clone for LayoutStyle
Source§fn clone(&self) -> LayoutStyle
fn clone(&self) -> LayoutStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more