Add context menu for image message.
This commit is contained in:
parent
b1fba8a8db
commit
ca5735d000
|
@ -28,12 +28,25 @@ AvatarContainer {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
|
||||||
propagateComposedEvents: true
|
propagateComposedEvents: true
|
||||||
ToolTip.visible: containsMouse
|
ToolTip.visible: containsMouse
|
||||||
ToolTip.text: content.body
|
ToolTip.text: content.body
|
||||||
|
|
||||||
onClicked: mouse.button & Qt.LeftButton ? downloadable.downloadAndOpen() : downloadable.saveFileAs()
|
onClicked: downloadable.downloadAndOpen()
|
||||||
|
onPressAndHold: messageImageMenu.popup()
|
||||||
|
}
|
||||||
|
|
||||||
|
Menu {
|
||||||
|
id: messageImageMenu
|
||||||
|
|
||||||
|
MenuItem {
|
||||||
|
text: "View"
|
||||||
|
onTriggered: downloadable.downloadAndOpen()
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
text: "Save as..."
|
||||||
|
onTriggered: downloadable.saveFileAs()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue