mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:06:56 -04:00
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>
This commit is contained in:
parent
78ece4ced9
commit
cc6de7d1f1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user