Shift avatar sizes down one class

- Map avatar small to xsmall, medium to small, and large to medium.
This commit is contained in:
2026-11-16 19:32:01 +07:00
parent 51a23aa526
commit 40beda76dc
+7 -1
View File
@@ -92,7 +92,13 @@ impl gpui::Styled for Avatar {
impl RenderOnce for Avatar { impl RenderOnce for Avatar {
fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement { fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement {
let theme = cx.theme(); let theme = cx.theme();
let side = theme.sizes.resolve(self.size).avatar_size; // Avatars sit one class below the shared control scale.
let size = match self.size {
Size::XSmall | Size::Small => Size::XSmall,
Size::Medium => Size::Small,
Size::Large => Size::Medium,
};
let side = theme.sizes.resolve(size).avatar_size;
let radius = if self.fully_rounded { let radius = if self.fully_rounded {
theme.radius.full theme.radius.full