summary refs log tree commit diff
path: root/resources/qml/delegates
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-12-13 19:09:03 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-13 19:09:03 +0100
commita0699f52475f5a2fca9d261bb886f8680b5ecf5d (patch)
treeafd0b820f4981859392d23f237055fff39a09afe /resources/qml/delegates
parentFix turnserver check not being started when restoring from cache (diff)
downloadnheko-a0699f52475f5a2fca9d261bb886f8680b5ecf5d.tar.xz
Multiply source size by scale factor
Might be unnecessary, but docs are unclear on that.
Diffstat (limited to 'resources/qml/delegates')
-rw-r--r--resources/qml/delegates/ImageMessage.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml
index 71c7bcc6..b8522a74 100644
--- a/resources/qml/delegates/ImageMessage.qml
+++ b/resources/qml/delegates/ImageMessage.qml
@@ -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 {