Expand description
Scrollbar geometry computation — single source of truth for the layout solver.
Provides ScrollbarRequirements (whether scrollbars are needed and how much
space they reserve) and ScrollbarGeometry (track, thumb, and button rects).
The main entry point is compute_scrollbar_geometry, whose output is consumed by:
- Display list painting (
paint_scrollbars) - GPU transform updates (
update_scrollbar_transforms) - Hit-testing (
hit_test_component) - Drag delta conversion (
handle_scrollbar_drag)
Structs§
- Scrollbar
Geometry - Single source of truth for scrollbar geometry.
- Scrollbar
Requirements - Information about scrollbar requirements and dimensions
Functions§
- compute_
scrollbar_ geometry - Compute scrollbar geometry for one axis.
- compute_
scrollbar_ geometry_ with_ button_ size - Like
compute_scrollbar_geometrybut allows overriding the button size. Passbutton_size = 0.0for macOS-style overlay scrollbars (no arrow buttons).