Function zng::widget::border_align

source ·
pub fn border_align(
    child: impl UiNode,
    align: impl IntoVar<FactorSideOffsets>,
) -> impl UiNode
Expand description

P Position of a widget borders in relation to the widget fill.

This property defines how much the widget’s border offsets affect the layout of the fill content, by default (0%) the fill content stretchers under the borders and is clipped by the corner_radius, in the other end of the scale (100%), the fill content is positioned inside the borders and clipped by the adjusted corner_radius that fits the insider of the inner most border.

Note that widget’s child is always inside the borders, this property only affects the fill properties, like the background.

Fill property implementers, see fill_node, a helper function for quickly implementing support for border_align.

Sets the BORDER_ALIGN_VAR.