From cc6de7d1f14b1a8602353649f2e052028752279a Mon Sep 17 00:00:00 2001 From: hrdl <31923882+hrdl-github@users.noreply.github.com> Date: Fri, 23 Feb 2024 18:05:36 +0100 Subject: [PATCH] fix(mobile): don't crop memories in landscape mode (#6907) Don't crop memories in landscape mode unless aspect ratios are close Co-authored-by: hrdl <7808331-hrdl@users.noreply.gitlab.com> --- mobile/lib/modules/memories/ui/memory_card.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/lib/modules/memories/ui/memory_card.dart b/mobile/lib/modules/memories/ui/memory_card.dart index 7c998e8f52..7a93550442 100644 --- a/mobile/lib/modules/memories/ui/memory_card.dart +++ b/mobile/lib/modules/memories/ui/memory_card.dart @@ -55,9 +55,9 @@ class MemoryCard extends StatelessWidget { LayoutBuilder( builder: (context, constraints) { // Determine the fit using the aspect ratio - BoxFit fit = BoxFit.fitWidth; + BoxFit fit = BoxFit.contain; if (asset.width != null && asset.height != null) { - final aspectRatio = asset.height! / asset.width!; + final aspectRatio = asset.width! / asset.height!; final phoneAspectRatio = constraints.maxWidth / constraints.maxHeight; // Look for a 25% difference in either direction