Allow size to be specified in ImageStyle

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2021-09-21 18:27:26 +02:00
co-authored by Nathan Sobo
parent f8990b707a
commit 1bd6cd0978
4 changed files with 31 additions and 19 deletions
+6 -14
View File
@@ -69,13 +69,9 @@ impl PeoplePanel {
.with_child(
Flex::row()
.with_children(collaborator.user.avatar.clone().map(|avatar| {
ConstrainedBox::new(
Image::new(avatar)
.with_style(theme.worktree_host_avatar)
.boxed(),
)
.with_width(20.)
.boxed()
Image::new(avatar)
.with_style(theme.worktree_host_avatar)
.boxed()
}))
.with_child(
Container::new(
@@ -152,13 +148,9 @@ impl PeoplePanel {
)
.with_children(worktree.participants.iter().filter_map(|participant| {
participant.avatar.clone().map(|avatar| {
ConstrainedBox::new(
Image::new(avatar)
.with_style(theme.worktree_guest_avatar)
.boxed(),
)
.with_width(16.)
.boxed()
Image::new(avatar)
.with_style(theme.worktree_guest_avatar)
.boxed()
})
}))
.boxed()