Skip to main content

orb

Function orb 

Source
pub fn orb(
    shape: Orb,
    key: impl Into<SharedString>,
    size_px: f32,
    theme: &Theme,
    painter: Painter,
    cx: &mut App,
) -> impl IntoElement
Expand description

The orbs — bezel’s own loaders, and the only ones here that are.

The three older loaders in this module are all grids of cells: a pulse row, a 3×3 matrix, a 2×3 mini. Three variations on one arrangement is a narrow vocabulary for the surface a library gets looked at through, and phase.rs makes the point itself: a loading indicator is a brand surface.

Everything is circles, because that is the whole vocabulary gpui gives at the pinned rev: no rotation transform, no conic gradient, and no blur filter on an element (crate::material’s backdrop blur blurs what is behind a surface and cannot soften the surface itself). So the glow is a BoxShadow, the ring is eight positioned dots rather than a swept arc, and every position is arithmetic — all of it pure and unit-tested in motion::phase.

One tint, from the theme’s accent. In three hues this would be the gradient spinner wearing a different shape.