aboutsummaryrefslogtreecommitdiff
path: root/qml/ComposePane.qml
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2021-10-21 20:18:32 +0100
committerlink2xt <link2xt@testrun.org>2021-10-31 11:24:31 +0300
commit48c2a5d7789d742631f8774ad8969d70e5ed0b2e (patch)
treed70550978d8be7dde324ee68fe0a48ee0ad8928a /qml/ComposePane.qml
parent483ade0aa979ed707d578b4445119ac084659ef0 (diff)
downloadkdeltachat-48c2a5d7789d742631f8774ad8969d70e5ed0b2e.tar.gz
kdeltachat-48c2a5d7789d742631f8774ad8969d70e5ed0b2e.zip
We add a bunch of keyboard shortcuts. F1 to show.
- Also, the play, pause and "save attachment" button have a little emoji before them - Tooltip show for buttons with shorcuts
Diffstat (limited to 'qml/ComposePane.qml')
-rw-r--r--qml/ComposePane.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/qml/ComposePane.qml b/qml/ComposePane.qml
index f80b249..19d2da9 100644
--- a/qml/ComposePane.qml
+++ b/qml/ComposePane.qml
@@ -51,6 +51,9 @@ Pane {
visible: root.canSend
text: attachFileUrl.length > 0 ? qsTr("Detach") : qsTr("Attach")
+ hoverEnabled: true
+ ToolTip.visible: hovered
+ ToolTip.text: attachFileUrl.length > 0 ? "Ctrl+O<br>Attached file is <b>" + attachFileUrl + "</b>" : "Ctrl+O"
Layout.alignment: Qt.AlignBottom
icon.name: "mail-attachment"
onClicked: {
@@ -59,6 +62,12 @@ Pane {
else
attachFileDialog.open();
}
+
+ action: Action {
+ shortcut: "Ctrl+O"
+ onTriggered: attachButton.click()
+ }
+
}
TextArea {
@@ -89,6 +98,9 @@ Pane {
Button {
id: sendButton
+ hoverEnabled: true
+ ToolTip.visible: hovered
+ ToolTip.text: "Ctrl+S"
visible: root.canSend
Layout.alignment: Qt.AlignBottom
icon.name: "document-send"
@@ -101,6 +113,16 @@ Pane {
messageField.text = "";
root.context.setDraft(chatId, null);
}
+
+ action: Action {
+ shortcut: "Ctrl+S"
+ onTriggered: {
+ if (sendButton.enabled == true)
+ sendButton.click();
+
+ }
+ }
+
}
Button {