Fix slideshow images not resizing properly (#1089)

## Description
During a slideshow of images, the viewpoint would resize to largest
image resolution and images with smaller dimensions would be scaled down
and centered with black bars.

This might be a Coil bug, but I'm not 100% sure yet. This PR works
around the issue by scaling all images to the display resolution instead
of using `Size.ORIGINAL`.

However, we want `Size.ORIGINAL` while zooming so it doesn't pixelate if
the original image's resolution is larger than the display's.

### Related issues
Fixes
https://github.com/damontecres/Wholphin/issues/835#issuecomment-4035005433

### Testing
Emulator with 1920x1080 & 800x1600 images

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Ray 2026-03-12 14:39:26 -04:00 committed by GitHub
parent cca818fabb
commit 62965c1b22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -395,8 +395,9 @@ fun SlideshowPage(
ImageRequest
.Builder(LocalContext.current)
.data(imageState.url)
.size(Size.ORIGINAL)
.transitionFactory(CrossFadeFactory(750.milliseconds))
.apply {
if (isZoomed) size(Size.ORIGINAL)
}.transitionFactory(CrossFadeFactory(750.milliseconds))
.useExistingImageAsPlaceholder(true)
.build(),
contentDescription = null,