Skip to main content

Module horizontal_scroll

Module horizontal_scroll 

Source
Expand description

Horizontal scroll window calculation utilities

Calculate the visible window of items that fit within available width, ensuring the selected item is always visible. Uses edge-based scrolling.

Structs§

HorizontalScrollWindow
Horizontal scroll window result

Functions§

calculate_horizontal_scroll_window
Calculate the visible window of items that fit within available width, ensuring the selected item is always visible. Uses edge-based scrolling: the window only scrolls when the selected item would be outside the visible range, and positions the selected item at the edge (not centered).