feat: unify theme system #7

Merged
reya merged 14 commits from unify-theme into master 2026-11-16 12:58:35 +00:00
Showing only changes of commit 40beda76dc - Show all commits
+7 -1
View File
@@ -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