FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TextLayoutRoundingPlacement

    enum · ferroui-controls · v0.5.0

    enum TextLayoutRoundingPlacement
    

    Where a text block puts the height layout rounding adds to it: below its text (the reference's placement, the default) or above it (WinUI's).

    View source

    Members

    Below

    Below
    

    The text starts at the top of the block (after its padding); the added height is below it. The placement of the reference, and of the Fluent and Simple themes.

    Source

    Above

    Above
    

    The added height is above the text, as WinUI's TextBlock puts it: the text ends at the bottom of the rounded box. The placement of the WinUI theme.

    Source

    offset

    fn offset(self: Self, height: f64, scale: f64) -> f64
    

    How far down a text block with layout rounding moves its text, in device-independent pixels: height is the height of its content (the text and the vertical padding), scale the layout scale. Zero for TextLayoutRoundingPlacement::Below, and for a height that is a whole number of device pixels already.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.