UI module

Style

structsince 0.31.0Source

Layout and paint options for a container or widget. Zero values mean "automatic" or "none", so a style is written with only what differs: .{gap = 8, padding = 12}.

Fields

gap: float
space between children
padding: float
space inside the edge, all sides
padding_x: float
added to padding on the left and right
padding_y: float
added to padding on the top and bottom
grow: float
share of the space left over in the parent's axis
width: float
fixed width (0: from content)
height: float
fixed height (0: from content)
min_width: float
min_height: float
align: Align
placement of children across the axis
justify: Justify
placement of children along the axis
background: Color
alpha 0: none
border_color: Color
border: float
border width
radius: float
corner radius
clip: bool
clip children to the rectangle

See also