Tweak avatar for thumbnail view
This commit is contained in:
parent
08277a3de3
commit
fe2228031f
|
@ -396,6 +396,7 @@ class IncomingCollectionItem extends StatelessWidget {
|
|||
padding: const EdgeInsets.only(right: 8.0, bottom: 8.0),
|
||||
child: UserAvatarWidget(
|
||||
c.collection.owner,
|
||||
thumbnailView: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -253,7 +253,10 @@ class EmailItemWidget extends StatelessWidget {
|
|||
captionedTextWidget: CaptionedTextWidget(
|
||||
title: collection.getSharees().firstOrNull?.email ?? '',
|
||||
),
|
||||
leadingIconWidget: UserAvatarWidget(collection.getSharees().first),
|
||||
leadingIconWidget: UserAvatarWidget(
|
||||
collection.getSharees().first,
|
||||
thumbnailView: true,
|
||||
),
|
||||
leadingIconSize: 24,
|
||||
menuItemColor: getEnteColorScheme(context).fillFaint,
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
|
|
|
@ -10,12 +10,14 @@ class UserAvatarWidget extends StatelessWidget {
|
|||
final User user;
|
||||
final AvatarType type;
|
||||
final int currentUserID;
|
||||
final bool thumbnailView;
|
||||
|
||||
const UserAvatarWidget(
|
||||
this.user, {
|
||||
super.key,
|
||||
this.currentUserID = -1,
|
||||
this.type = AvatarType.mini,
|
||||
this.thumbnailView = false,
|
||||
});
|
||||
|
||||
@override
|
||||
|
@ -36,15 +38,19 @@ class UserAvatarWidget extends StatelessWidget {
|
|||
return Container(
|
||||
height: size,
|
||||
width: size,
|
||||
padding: const EdgeInsets.all(2),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: decorationColor,
|
||||
border: Border.all(
|
||||
color: strokeBaseDark,
|
||||
width: 1.0,
|
||||
),
|
||||
),
|
||||
padding: thumbnailView
|
||||
? const EdgeInsets.only(bottom: 1)
|
||||
: const EdgeInsets.all(2),
|
||||
decoration: thumbnailView
|
||||
? null
|
||||
: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: decorationColor,
|
||||
border: Border.all(
|
||||
color: strokeBaseDark,
|
||||
width: 1.0,
|
||||
),
|
||||
),
|
||||
child: CircleAvatar(
|
||||
backgroundColor: decorationColor,
|
||||
child: Text(
|
||||
|
|
|
@ -100,6 +100,7 @@ class OwnerAvatarOverlayIcon extends StatelessWidget {
|
|||
child: UserAvatarWidget(
|
||||
user,
|
||||
type: AvatarType.tiny,
|
||||
thumbnailView: true,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue