aboutsummaryrefslogtreecommitdiff
path: root/qml/ComposePane.qml
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>1970-01-01 00:00:00 +0000
committerlink2xt <link2xt@testrun.org>1970-01-01 00:00:00 +0000
commitbb6244f9fa200d8442b9256fc25d1c1bc9578d26 (patch)
tree4b907e152ef2b8b4ab2b155f670f465c9ffc72b2 /qml/ComposePane.qml
parent021d00d9d9148be3c5969ac7834403c695f9258d (diff)
downloadkdeltachat-bb6244f9fa200d8442b9256fc25d1c1bc9578d26.tar.gz
kdeltachat-bb6244f9fa200d8442b9256fc25d1c1bc9578d26.zip
Change "Attach" button to "Detach" when file is attached
As a side effect, this adds a visual cue that a file will be sent. There is no file preview yet, so at least some indicator is needed.
Diffstat (limited to 'qml/ComposePane.qml')
-rw-r--r--qml/ComposePane.qml10
1 files changed, 8 insertions, 2 deletions
diff --git a/qml/ComposePane.qml b/qml/ComposePane.qml
index 2dc24d1..f8f3b6b 100644
--- a/qml/ComposePane.qml
+++ b/qml/ComposePane.qml
@@ -50,13 +50,19 @@ Pane {
Button {
id: attachButton
visible: root.canSend
- text: qsTr("Attach")
+ text: attachFileUrl.length > 0 ? qsTr("Detach") : qsTr("Attach")
Layout.alignment: Qt.AlignBottom
icon.name: "mail-attachment"
- onClicked: attachFileDialog.open()
+ onClicked: {
+ if (attachFileUrl.length > 0) {
+ attachFileUrl = ""
+ } else {
+ attachFileDialog.open()
+ }
+ }
}
TextArea {