Skip to main content

Module scrollbar

Module scrollbar 

Source
Expand description

Overlay-scrollbar interaction FSM + fade driver (spec section 16.2 / section 16.6).

Painting lives in lumen_core::render_world::extract_scrollbars; this module owns everything main-world:

  • auto-attaching ScrollbarState to every Scroll container,
  • the pointer FSM (thumb hover highlight, thumb press + drag with absolute 1:1 mapping and pointer capture, track click = jump-to-position - consistent with the <slider> track-click decision in crate::controls),
  • the overlay fade: bars stay fully visible while scrolling / hovered, then fade out after ScrollbarStyle::fade_delay_secs of inactivity. The fade frames self-schedule through lumen_core::render_world::AnimationsActive and go quiescent the moment alpha reaches its resting value.

Wheel events are never consumed here - hovering a bar resolves the hit-test to the scroll container itself (see lumen_input::hit_test), so the wheel keeps routing through the normal nested-scroll chain.

Functions§

update_scrollbars
Pointer FSM + fade driver for overlay scrollbars. Runs in TickStage::Systems strictly before lumen_input::hit_test so the ScrollbarInteraction resource the hit-test consults reflects this tick’s pointer position.