Try out DelegateChooser
requires Qt5.12+
This commit is contained in:
parent
7f41752165
commit
b9076c5c4d
9 changed files with 189 additions and 157 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue