Explorar o código

Fix alignment for empty hidden state

Neeraj Gupta %!s(int64=2) %!d(string=hai) anos
pai
achega
5be159ef1a
Modificáronse 1 ficheiros con 61 adicións e 58 borrados
  1. 61 58
      lib/ui/viewer/gallery/empty_hidden_widget.dart

+ 61 - 58
lib/ui/viewer/gallery/empty_hidden_widget.dart

@@ -12,68 +12,71 @@ class EmptyHiddenWidget extends StatelessWidget {
     final EnteColorScheme enteColorScheme = getEnteColorScheme(context);
     return Padding(
       padding: const EdgeInsets.all(8.0),
-      child: Column(
-        mainAxisAlignment: MainAxisAlignment.center,
-        children: [
-          Icon(
-            Icons.visibility_off,
-            color: enteColorScheme.strokeMuted,
-            size: 24,
-          ),
-          const SizedBox(height: 10),
-          Text(
-            "No hidden photos or videos",
-            textAlign: TextAlign.center,
-            style: enteTextTheme.body.copyWith(
-              color: enteColorScheme.textMuted,
+      child: SizedBox(
+        width: double.infinity,
+        child: Column(
+          mainAxisAlignment: MainAxisAlignment.center,
+          children: [
+            Icon(
+              Icons.visibility_off,
+              color: enteColorScheme.strokeMuted,
+              size: 24,
             ),
-          ),
-          const SizedBox(height: 36),
-          Column(
-            crossAxisAlignment: CrossAxisAlignment.start,
-            children: [
-              const EmptyHiddenTextWidget("To hide a photo or video"),
-              const SizedBox(height: 4),
-              Padding(
-                padding: const EdgeInsets.only(left: 6),
-                child: Column(
-                  crossAxisAlignment: CrossAxisAlignment.start,
-                  children: [
-                    const EmptyHiddenTextWidget("• Open the item"),
-                    const SizedBox(height: 2),
-                    const EmptyHiddenTextWidget(
-                      "• Click on the overflow menu",
-                    ),
-                    const SizedBox(height: 2),
-                    SizedBox(
-                      width: 120,
-                      child: Row(
-                        children: [
-                          const EmptyHiddenTextWidget("• Click "),
-                          const SizedBox(width: 4),
-                          Icon(
-                            Icons.visibility_off,
-                            color: enteColorScheme.strokeBase,
-                            size: 16,
-                          ),
-                          const Padding(
-                            padding: EdgeInsets.all(4),
-                          ),
-                          Text(
-                            "Hide",
-                            style: TextStyle(
-                              color: enteColorScheme.textBase,
+            const SizedBox(height: 10),
+            Text(
+              "No hidden photos or videos",
+              textAlign: TextAlign.center,
+              style: enteTextTheme.body.copyWith(
+                color: enteColorScheme.textMuted,
+              ),
+            ),
+            const SizedBox(height: 36),
+            Column(
+              crossAxisAlignment: CrossAxisAlignment.start,
+              children: [
+                const EmptyHiddenTextWidget("To hide a photo or video"),
+                const SizedBox(height: 4),
+                Padding(
+                  padding: const EdgeInsets.only(left: 6),
+                  child: Column(
+                    crossAxisAlignment: CrossAxisAlignment.start,
+                    children: [
+                      const EmptyHiddenTextWidget("• Open the item"),
+                      const SizedBox(height: 2),
+                      const EmptyHiddenTextWidget(
+                        "• Click on the overflow menu",
+                      ),
+                      const SizedBox(height: 2),
+                      SizedBox(
+                        width: 120,
+                        child: Row(
+                          children: [
+                            const EmptyHiddenTextWidget("• Click "),
+                            const SizedBox(width: 4),
+                            Icon(
+                              Icons.visibility_off,
+                              color: enteColorScheme.strokeBase,
+                              size: 16,
+                            ),
+                            const Padding(
+                              padding: EdgeInsets.all(4),
                             ),
-                          ),
-                        ],
+                            Text(
+                              "Hide",
+                              style: TextStyle(
+                                color: enteColorScheme.textBase,
+                              ),
+                            ),
+                          ],
+                        ),
                       ),
-                    ),
-                  ],
+                    ],
+                  ),
                 ),
-              ),
-            ],
-          ),
-        ],
+              ],
+            ),
+          ],
+        ),
       ),
     );
   }