summary refs log tree commit diff
path: root/resources/qml/delegates
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-03-01 19:55:43 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-03-03 02:34:26 +0100
commit0fc98b26920961f4cf9002f0413684d9c18671cc (patch)
tree150152fdeaf1398a64618d77fc9ada6d48bed3ec /resources/qml/delegates
parentFix avatar layering in room list (diff)
downloadnheko-0fc98b26920961f4cf9002f0413684d9c18671cc.tar.xz
Experimental blurhash implementation (MXC2448)
Diffstat (limited to 'resources/qml/delegates')
-rw-r--r--resources/qml/delegates/ImageMessage.qml14
1 files changed, 14 insertions, 0 deletions
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml
index cb05021d..62cae42c 100644
--- a/resources/qml/delegates/ImageMessage.qml
+++ b/resources/qml/delegates/ImageMessage.qml
@@ -12,6 +12,20 @@ Item {
 	width: tooHigh ? (timelineRoot.height / 2) / model.data.proportionalHeight : tempWidth
 
 	Image {
+		id: blurhash
+		anchors.fill: parent
+		visible: img.status != Image.Ready
+
+		source: model.data.blurhash ? ("image://blurhash/" + model.data.blurhash) : ("image://colorimage/:/icons/icons/ui/do-not-disturb-rounded-sign@2x.png?"+colors.buttonText)
+		asynchronous: true
+		fillMode: Image.PreserveAspectFit
+
+
+		sourceSize.width: parent.width
+		sourceSize.height: parent.height
+	}
+
+	Image {
 		id: img
 		anchors.fill: parent