zng::layout

Function baseline

source
pub fn baseline(
    child: impl UiNode,
    baseline: impl IntoVar<Length>,
) -> impl UiNode
Expand description

P Set or overwrite the baseline of the widget.

The baseline is a vertical offset from the bottom edge of the widget’s inner bounds up, it defines the line where the widget naturally sits, some widgets like [Text!` have a non-zero default baseline, most others leave it at zero.

Relative values are computed from the widget’s height.