Guide API
Skip to main content

on_bounds_changed

Function on_bounds_changed 

Source
pub fn on_bounds_changed<L: ListViewer + ?Sized>(
    this: &L,
    ctx: &mut Context<'_>,
)
Expand description

The resize-step formula — called from on_bounds_changed for concrete ListViewer implementors.

After the new bounds are applied, re-publish each scrollbar’s page step while preserving its arrow step: the vertical bar uses a plain size.y page step and the horizontal bar uses size.x / num_cols.

Differs from the construction formula (update_steps): resize uses size.y for the vertical bar (not size.y - 1 / size.y * num_cols) and does NOT touch the arrow step.