Expand description
ProgressBar โ a bar showing progress from 0.0 to 1.0.
Supports determinate (fixed or reactive value), indeterminate (animated
sweep), horizontal, and vertical orientations. The stationary chrome (track
and determinate fill) is delegated to ProgressBarStyle; the indeterminate
sweep is widget-owned (motion infrastructure is not chrome). Three paint
paths exist internally:
- Horizontal indeterminate uses the shader-driven animated-quad
pipeline.
ProgressBar::buildregisters anAnimatedQuadHandleand mounts a singleIndeterminateSweepLeafwhosepaint()issues onedraw_animated_quadper frame; the shader composes the track + moving fill in a procedural draw. The recipe frame is NOT mounted in this case (the shader self-paints both). - Vertical indeterminate keeps the signal-based path. The
recipe frame paints the track; an
IndeterminateSweepLeafin signal mode paints a moving fill rect on top driven by aSignal<f32>::animate_looping. - Determinate mounts the recipe frame only; the frame paints the track plus a proportional fill rect.
// Static determinate bar at 70 %:
let _bar = ProgressBar::new(0.7).thickness(6.0);
// Reactive determinate bar:
let progress = Signal::new(0.0_f32);
let _bar = ProgressBar::new(0.0).value(progress);
// Indeterminate (animated sweep):
let _spinner_bar = ProgressBar::indeterminate();Structsยง
- Progress
Bar - A progress bar โ determinate or indeterminate, horizontal or vertical.