diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-03-01 19:55:43 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-03-03 02:34:26 +0100 |
commit | 0fc98b26920961f4cf9002f0413684d9c18671cc (patch) | |
tree | 150152fdeaf1398a64618d77fc9ada6d48bed3ec /resources | |
parent | Fix avatar layering in room list (diff) | |
download | nheko-0fc98b26920961f4cf9002f0413684d9c18671cc.tar.xz |
Experimental blurhash implementation (MXC2448)
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/delegates/ImageMessage.qml | 14 |
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 |