Skip to main content

activity

Function activity 

Source
pub fn activity(
    ui: &mut Ui,
    reduced: bool,
    palette: &Palette,
    style: &WidgetStyle,
) -> Response
Expand description

The activity mark: one small square, blinking.

Rule 2 of wiki loading-and-progress-standard, and the thing that replaced Ui::spinner here. A spinner turns at a rate it invented and reads as progress; this claims nothing beyond “something is happening”, which is the whole of what an unmeasured wait knows.

reduced stills the mark rather than removing it. egui has no prefers-reduced-motion, so the preference arrives as a bool from whatever the host asked its own platform, exactly as makeover_timing::activity_blink is shaped for. A still mark still says something is happening; hiding it would answer a request nobody made.

The cadence is makeover_timing::Cadence::Activity and is not a number this crate chooses, so a browser, a terminal and an egui window blink together.

Repaint is asked for at the next flip rather than every frame: a blinking mark should not turn a window that is otherwise idle into one that renders continuously.