Skip to main content

Module avatar

Module avatar 

Source
Expand description

Avatar — a circular (or rounded-square) user thumbnail.

egui has no built-in image loader, so this port renders the fallback representation gpui-component shows while/instead of an image: a colored disc with the user’s initials. Build it from a display name with Avatar::from_name (initials + a deterministic color are derived for you) or set the initials and colors explicitly.

ui.add(sc::Avatar::from_name("Ada Lovelace").status(sc::AvatarStatus::Online));

Structs§

Avatar

Enums§

AvatarShape
Outline shape of the avatar.
AvatarStatus
Optional presence indicator drawn as a dot in the bottom-right corner.