pub struct AvatarGroup { /* private fields */ }Expand description
A row of overlapping avatars with an optional +N overflow tile.
All members share the group’s size and surface so the punch-out ring reads cleanly. Pass an explicit surface when placing the group on a card or non-default background.
ui.add(
AvatarGroup::new()
.size(AvatarSize::Medium)
.item(Avatar::new("AL").tone(AvatarTone::Sky))
.item(Avatar::new("MR").tone(AvatarTone::Green))
.item(Avatar::new("JK").tone(AvatarTone::Amber))
.overflow(7),
);Implementations§
Source§impl AvatarGroup
impl AvatarGroup
Sourcepub fn item(self, avatar: Avatar) -> Self
pub fn item(self, avatar: Avatar) -> Self
Append an avatar. The group’s size and surface override anything set on the passed avatar so members share a uniform diameter.
Sourcepub fn overflow(self, n: usize) -> Self
pub fn overflow(self, n: usize) -> Self
Show a trailing +N neutral tile. Counts beyond the on-screen
items.
Sourcepub fn overlap(self, overlap: f32) -> Self
pub fn overlap(self, overlap: f32) -> Self
Pixels of overlap between adjacent avatars. Default: 10 pt.
Sourcepub fn size(self, size: AvatarSize) -> Self
pub fn size(self, size: AvatarSize) -> Self
Pin the size for every member of the group. Default:
AvatarSize::Medium.
Trait Implementations§
Source§impl Debug for AvatarGroup
impl Debug for AvatarGroup
Source§impl Default for AvatarGroup
impl Default for AvatarGroup
Auto Trait Implementations§
impl Freeze for AvatarGroup
impl RefUnwindSafe for AvatarGroup
impl Send for AvatarGroup
impl Sync for AvatarGroup
impl Unpin for AvatarGroup
impl UnsafeUnpin for AvatarGroup
impl UnwindSafe for AvatarGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more