Multiply source size by scale factor

Might be unnecessary, but docs are unclear on that.
This commit is contained in:
Nicolas Werner 2021-12-13 19:09:03 +01:00
parent 9b9d4bec70
commit a0699f5247
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
7 changed files with 20 additions and 16 deletions

View file

@ -32,8 +32,8 @@ Item {
source: blurhash ? ("image://blurhash/" + blurhash) : ("image://colorimage/:/icons/icons/ui/image-failed.svg?" + Nheko.colors.buttonText)
asynchronous: true
fillMode: Image.PreserveAspectFit
sourceSize.width: parent.width
sourceSize.height: parent.height
sourceSize.width: parent.width * Screen.devicePixelRatio
sourceSize.height: parent.height * Screen.devicePixelRatio
}
Image {
@ -47,8 +47,8 @@ Item {
smooth: true
mipmap: true
sourceSize.width: Math.min(Screen.desktopAvailableWidth, originalWidth || undefined)
sourceSize.height: Math.min(Screen.desktopAvailableHeight, originalWidth*proportionalHeight || undefined)
sourceSize.width: Math.min(Screen.desktopAvailableWidth, originalWidth || undefined) * Screen.devicePixelRatio
sourceSize.height: Math.min(Screen.desktopAvailableHeight, originalWidth*proportionalHeight || undefined) * Screen.devicePixelRatio
}
MxcAnimatedImage {