matrixion/resources/qml/delegates/ImageMessage.qml

24 lines
466 B
QML
Raw Normal View History

import QtQuick 2.6
2019-10-06 02:44:02 +03:00
import com.github.nheko 1.0
Item {
width: 300
height: 300 * model.proportionalHeight
Image {
2019-09-28 12:07:58 +03:00
id: img
anchors.fill: parent
source: model.url.replace("mxc://", "image://MxcImage/")
asynchronous: true
fillMode: Image.PreserveAspectFit
2019-09-28 12:07:58 +03:00
MouseArea {
enabled: model.type == MtxEvent.ImageMessage
2019-09-28 12:07:58 +03:00
anchors.fill: parent
onClicked: timelineManager.openImageOverlay(model.url, model.filename, model.mimetype, model.type)
2019-09-28 12:07:58 +03:00
}
}
}