progress-circle
Builds ProgressCircle


The code that drew it
A still frame holds a repeating animation at its first frame and a one-shot at its last, because a still of a moving thing is not reproducible. Run the gallery to review motion.
fn progress_circle(_window: &mut Window, cx: &mut App) -> AnyElement {
let theme = cx.theme().clone();
stack(&theme)
.w(px(520.0))
.child(caption(
&theme,
"a position exists only when the extent is known",
))
.child(
row(&theme)
.gap(px(theme.spacing.lg))
.child(
ProgressCircle::new("scene.progress-circle.upload")
.count(3, 12)
.label("Uploading artifacts")
.centre("25%"),
)
.child(
ProgressCircle::new("scene.progress-circle.verify")
.fraction(0.72)
.label("Verifying checksums")
.display("72%")
.centre("72%"),
)
.child(
ProgressCircle::new("scene.progress-circle.contact")
.label("Contacting the host"),
),
)
.child(caption(&theme, "the size ramp"))
.child(
row(&theme)
.gap(px(theme.spacing.lg))
.child(
ProgressCircle::new("scene.progress-circle.xs")
.fraction(0.4)
.label("Extra small")
.xs(),
)
.child(
ProgressCircle::new("scene.progress-circle.sm")
.fraction(0.4)
.label("Small")
.small(),
)
.child(
ProgressCircle::new("scene.progress-circle.md")
.fraction(0.4)
.label("Medium")
.medium(),
)
.child(
ProgressCircle::new("scene.progress-circle.lg")
.fraction(0.4)
.label("Large")
.large(),
),
)
.into_any_element()
}