Add drop area for conveniently share files

This commit is contained in:
Carl Schwan
2020-11-16 22:14:53 +00:00
parent dc3896db1b
commit 8c3e5b2b48

View File

@@ -357,6 +357,26 @@ Kirigami.ScrollablePage {
}
}
DropArea {
id: dropAreaFile
anchors.fill: parent
onDropped: chatTextInput.attach(drop.urls[0])
}
QQC2.Pane {
visible: dropAreaFile.containsDrag
anchors {
fill: parent
margins: Kirigami.Units.gridUnit
}
Kirigami.PlaceholderMessage {
anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4)
text: i18n("Drag items here to share them")
}
}
footer: ChatTextInput {
id: chatTextInput
Layout.fillWidth: true