Pārlūkot izejas kodu

Use same abstraction for archived

Manav 2 gadi atpakaļ
vecāks
revīzija
93fc83f840
1 mainītis faili ar 12 papildinājumiem un 19 dzēšanām
  1. 12 19
      lib/ui/viewer/file/file_icons_widget.dart

+ 12 - 19
lib/ui/viewer/file/file_icons_widget.dart

@@ -116,6 +116,18 @@ class FavoriteOverlayIcon extends StatelessWidget {
   }
 }
 
+class ArchiveOverlayIcon extends StatelessWidget {
+  const ArchiveOverlayIcon({Key? key}) : super(key: key);
+
+  @override
+  Widget build(BuildContext context) {
+    return const BottomLeftOverlayIcon(
+      Icons.archive_outlined,
+      color: fixedStrokeMutedWhite,
+    );
+  }
+}
+
 class TrashedFileOverlayText extends StatelessWidget {
   final TrashFile file;
 
@@ -144,25 +156,6 @@ class TrashedFileOverlayText extends StatelessWidget {
   }
 }
 
-class ArchiveOverlayIcon extends StatelessWidget {
-  const ArchiveOverlayIcon({Key? key}) : super(key: key);
-
-  @override
-  Widget build(BuildContext context) {
-    return const Align(
-      alignment: Alignment.bottomLeft,
-      child: Padding(
-        padding: EdgeInsets.only(left: 4, bottom: 4),
-        child: Icon(
-          Icons.archive_outlined,
-          size: 20,
-          color: fixedStrokeMutedWhite,
-        ),
-      ),
-    );
-  }
-}
-
 // Base variations
 
 /// Icon overlay in the bottom left.