Kaynağa Gözat

Tweak avatar for thumbnail view

Neeraj Gupta 2 yıl önce
ebeveyn
işleme
fe2228031f

+ 1 - 0
lib/ui/shared_collections_gallery.dart

@@ -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,
                       ),
                     ),
                   ),

+ 4 - 1
lib/ui/sharing/share_collection_page.dart

@@ -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,

+ 15 - 9
lib/ui/sharing/user_avator_widget.dart

@@ -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(

+ 1 - 0
lib/ui/viewer/file/file_icons_widget.dart

@@ -100,6 +100,7 @@ class OwnerAvatarOverlayIcon extends StatelessWidget {
         child: UserAvatarWidget(
           user,
           type: AvatarType.tiny,
+          thumbnailView: true,
         ),
       ),
     );