diff --git a/.claude/photo_swipe_culling/card_issue_screenshots/no_swipe_all_good.png b/.claude/photo_swipe_culling/card_issue_screenshots/no_swipe_all_good.png new file mode 100644 index 0000000000..3b9888b11f Binary files /dev/null and b/.claude/photo_swipe_culling/card_issue_screenshots/no_swipe_all_good.png differ diff --git a/.claude/photo_swipe_culling/card_issue_screenshots/swipe_and_all_wrong.png b/.claude/photo_swipe_culling/card_issue_screenshots/swipe_and_all_wrong.png new file mode 100644 index 0000000000..0a5156eb5f Binary files /dev/null and b/.claude/photo_swipe_culling/card_issue_screenshots/swipe_and_all_wrong.png differ diff --git a/mobile/apps/photos/lib/ui/pages/library_culling/widgets/swipeable_photo_card.dart b/mobile/apps/photos/lib/ui/pages/library_culling/widgets/swipeable_photo_card.dart index d553af2398..409d62ec2a 100644 --- a/mobile/apps/photos/lib/ui/pages/library_culling/widgets/swipeable_photo_card.dart +++ b/mobile/apps/photos/lib/ui/pages/library_culling/widgets/swipeable_photo_card.dart @@ -157,11 +157,8 @@ class _SwipeablePhotoCardState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ + // Let the image size itself, then wrap with decoration Container( - constraints: BoxConstraints( - maxWidth: maxWidth, - maxHeight: maxHeight, - ), decoration: BoxDecoration( borderRadius: BorderRadius.circular(16), boxShadow: [ @@ -171,38 +168,35 @@ class _SwipeablePhotoCardState extends State { offset: const Offset(0, 5), ), ], + // Apply border directly when swiping + border: borderColor != null && borderWidth > 0 + ? Border.all( + color: borderColor, + width: borderWidth, + ) + : null, ), child: ClipRRect( borderRadius: BorderRadius.circular(16), - child: Stack( - children: [ - // Main photo - progressively load from thumbnail to full image - if (_imageProvider != null) - Image( - image: _imageProvider!, - fit: BoxFit.contain, - gaplessPlayback: true, + child: _imageProvider != null + ? ConstrainedBox( + constraints: BoxConstraints( + maxWidth: maxWidth, + maxHeight: maxHeight, + ), + child: Image( + image: _imageProvider!, + fit: BoxFit.contain, + gaplessPlayback: true, + ), ) - else - const Center( - child: EnteLoadingWidget(), - ), - - // Border overlay for swipe feedback - if (borderColor != null && borderWidth > 0) - IgnorePointer( - child: Container( - decoration: BoxDecoration( - border: Border.all( - color: borderColor, - width: borderWidth, - ), - borderRadius: BorderRadius.circular(16), - ), + : SizedBox( + width: maxWidth * 0.8, + height: maxHeight * 0.5, + child: const Center( + child: EnteLoadingWidget(), ), ), - ], - ), ), ), // File info directly below the image