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