Try out DelegateChooser

requires Qt5.12+
This commit is contained in:
Nicolas Werner 2019-10-08 20:55:09 +02:00
parent 7f41752165
commit b9076c5c4d
9 changed files with 189 additions and 157 deletions

View file

@ -4,20 +4,20 @@ import com.github.nheko 1.0
Item {
width: 300
height: 300 * eventData.proportionalHeight
height: 300 * model.proportionalHeight
Image {
id: img
anchors.fill: parent
source: eventData.url.replace("mxc://", "image://MxcImage/")
source: model.url.replace("mxc://", "image://MxcImage/")
asynchronous: true
fillMode: Image.PreserveAspectFit
MouseArea {
enabled: eventData.type == MtxEvent.ImageMessage
enabled: model.type == MtxEvent.ImageMessage
anchors.fill: parent
onClicked: timelineManager.openImageOverlay(eventData.url, eventData.filename, eventData.mimetype, eventData.type)
onClicked: timelineManager.openImageOverlay(model.url, model.filename, model.mimetype, model.type)
}
}
}