From 3fb5de8f3217f9a6a1b8c4163abfa9c8822a835d Mon Sep 17 00:00:00 2001 From: faumaray Date: Wed, 28 Oct 2026 10:01:34 +0300 Subject: [PATCH] voelin-gpui: an avatar's picture rounds its own corners The avatar's face clipped its picture with overflow_hidden, which GPUI makes a rectangle: a person's picture was a square with the round avatar's ring around it (the members panel and the tree showed it at 22 to 46 pixels, the voice page's 80 pixel avatars make it plain). The image element takes the radius itself. Co-Authored-By: Claude Sonnet 5.5 --- crates/voelin-gpui/src/shell/widgets.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/voelin-gpui/src/shell/widgets.rs b/crates/voelin-gpui/src/shell/widgets.rs index 18829d4..487ba5c 100644 --- a/crates/voelin-gpui/src/shell/widgets.rs +++ b/crates/voelin-gpui/src/shell/widgets.rs @@ -181,7 +181,10 @@ impl RenderOnce for Avatar { .justify_center() .bg(hsla(if key.is_some() { c.surface_3 } else { tint(self.tint) })); let face = match key { - Some(key) => face.child(picture(key).size_full().object_fit(ObjectFit::Cover)), + // The picture rounds its own corners: a parent's `overflow_hidden` + // clips to a rectangle. + Some(key) => face + .child(picture(key).size_full().rounded(px(radius)).object_fit(ObjectFit::Cover)), None => { let (letters, size) = initials_for(&self.initials, self.size); face.child(