feat: unify theme system #7
@@ -92,7 +92,13 @@ impl gpui::Styled for Avatar {
|
||||
impl RenderOnce for Avatar {
|
||||
fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||
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 {
|
||||
theme.radius.full
|
||||
|
||||
Reference in New Issue
Block a user