summary refs log tree commit diff
path: root/resources/qml/delegates
diff options
context:
space:
mode:
authorq234rty <q23456yuiop@gmail.com>2024-02-15 22:57:07 +0800
committerq234rty <q23456yuiop@gmail.com>2024-02-16 16:57:31 +0800
commit7b07548b773bcb601f0af21d49a3ec393dddb26e (patch)
tree25a7c1434b64f7f38d3cd939df0361da577487d8 /resources/qml/delegates
parentTry to fix the blurry encryption indicator on high dpi (diff)
downloadnheko-7b07548b773bcb601f0af21d49a3ec393dddb26e.tar.xz
HiDPI Fixes
Fix various downscaled icons by removing undeeded multiplications by devicePixelRatio in sourceSize.

Fix downscaled PL indicator in the timeline by using the actual size as sourceSize.

Fix various blurry icons by specifying sourceSize.
Diffstat (limited to 'resources/qml/delegates')
-rw-r--r--resources/qml/delegates/ImageMessage.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml
index 18ff11d2..f75ad7b7 100644
--- a/resources/qml/delegates/ImageMessage.qml
+++ b/resources/qml/delegates/ImageMessage.qml
@@ -141,8 +141,8 @@ AbstractButton {
         source: blurhash ? ("image://blurhash/" + blurhash) : ("image://colorimage/:/icons/icons/ui/image-failed.svg?" + palette.buttonText)
         asynchronous: true
         fillMode: Image.PreserveAspectFit
-        sourceSize.width: parent.width * Screen.devicePixelRatio
-        sourceSize.height: parent.height * Screen.devicePixelRatio
+        sourceSize.width: blurhash ? parent.width * Screen.devicePixelRatio : Math.min(parent.width, parent.height)
+        sourceSize.height: blurhash ? parent.height * Screen.devicePixelRatio : Math.min(parent.width, parent.height)
 
         anchors.fill: parent
     }