mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00: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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue