Browse Source

[mobile][photos] Fix colours in loading screen on light theme when viewing photos (#1283)

## Description

Before


https://github.com/ente-io/ente/assets/77285023/75304321-1fa4-4d61-9ad1-cc87ade62f92

After



https://github.com/ente-io/ente/assets/77285023/55b204b2-773c-42db-a03c-c9879f33548b
Vishnu Mohandas 1 year ago
parent
commit
1e106d707f

+ 2 - 0
mobile/lib/ui/viewer/file/detail_page.dart

@@ -140,6 +140,7 @@ class _DetailPageState extends State<DetailPage> {
       ),
       extendBodyBehindAppBar: true,
       resizeToAvoidBottomInset: false,
+      backgroundColor: Colors.black,
       body: Center(
         child: Stack(
           children: [
@@ -165,6 +166,7 @@ class _DetailPageState extends State<DetailPage> {
 
   Widget _buildPageView(BuildContext context) {
     return PageView.builder(
+      clipBehavior: Clip.none,
       itemBuilder: (context, index) {
         final file = _files![index];
         _preloadFiles(index);

+ 7 - 3
mobile/lib/ui/viewer/file/zoomable_image.dart

@@ -59,6 +59,7 @@ class _ZoomableImageState extends State<ZoomableImage> {
 
   @override
   void initState() {
+    super.initState();
     _photo = widget.photo;
     _logger = Logger("ZoomableImage");
     _logger.info('initState for ${_photo.generatedID} with tag ${_photo.tag}');
@@ -70,7 +71,6 @@ class _ZoomableImageState extends State<ZoomableImage> {
       debugPrint("isZooming = $_isZooming, currentState $value");
       // _logger.info('is reakky zooming $_isZooming with state $value');
     };
-    super.initState();
   }
 
   @override
@@ -135,7 +135,9 @@ class _ZoomableImageState extends State<ZoomableImage> {
                 height: screenRelativeImageHeight,
                 child: Hero(
                   tag: widget.tagPrefix! + _photo.tag,
-                  child: const EnteLoadingWidget(),
+                  child: const EnteLoadingWidget(
+                    color: Colors.white,
+                  ),
                 ),
               ),
             );
@@ -143,7 +145,9 @@ class _ZoomableImageState extends State<ZoomableImage> {
         ),
       );
     } else {
-      content = const EnteLoadingWidget();
+      content = const EnteLoadingWidget(
+        color: Colors.white,
+      );
     }
 
     final GestureDragUpdateCallback? verticalDragCallback = _isZooming