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 <noreply@anthropic.com>
This commit is contained in:
1 parent
6e866b95f6
commit
3fb5de8f32
1 file changed
+4
-1
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user