Skip to main content

vertical_scrollbar

Function vertical_scrollbar 

Source
pub fn vertical_scrollbar(
    viewport_origin: Vec2,
    viewport_size: Vec2,
    content_h: f32,
    offset_y: f32,
    corner_reserved: bool,
    m: ScrollbarMetrics,
) -> Option<ScrollbarGeometry>
Expand description

Geometry for the vertical overlay bar of a viewport at (viewport_origin, viewport_size) whose content is content_h tall, scrolled to offset_y. Returns None when the content does not overflow (as-needed visibility, spec section 16.2). corner_reserved should be true when the horizontal bar is also visible so the two bars don’t overlap in the corner. m supplies the style-resolved visual metrics (ScrollbarStyle::metrics).