aboutsummaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2021-11-03 13:04:20 +0100
committerMiquel Lionel <lionel@les-miquelots.net>2021-11-03 13:04:20 +0100
commita414601fcab42c883c1c5e391b76e91a92446f91 (patch)
tree05e0df1cc249ebf3efec5e1d1b8fb4652b6aa4b0 /qml
parent5960341553d2d3343ef708d19013595c8000d3db (diff)
downloadkdeltachat-a414601fcab42c883c1c5e391b76e91a92446f91.tar.gz
kdeltachat-a414601fcab42c883c1c5e391b76e91a92446f91.zip
revert shortcut to action due to bug
- ComposePane.qml shortcut for attaching a file or sending a message stops working once you switch accounts, so for the moment we switch to "action: Action" blocks for Button controls. I still need to figure out why the numbers of presses needed to trigger the shortcut increments each time I switch accounts.
Diffstat (limited to 'qml')
-rw-r--r--qml/ComposePane.qml57
1 files changed, 31 insertions, 26 deletions
diff --git a/qml/ComposePane.qml b/qml/ComposePane.qml
index d1140ba..976b4f1 100644
--- a/qml/ComposePane.qml
+++ b/qml/ComposePane.qml
@@ -29,28 +29,6 @@ Pane {
padding: 0
- Shortcut {
- sequence: "Ctrl+S"
- onActivated: {
- if (sendButton.enabled) {
- sendButton.focus = true;
- sendButton.clicked();
- sendButton.focus = false;
- }
- }
- }
-
- Shortcut {
- sequence: "Ctrl+O"
- onActivated: {
- if (attachButton.enabled) {
- attachButton.focus = true;
- attachButton.clicked();
- attachButton.focus = false;
- }
- }
- }
-
FileDialog {
id: attachFileDialog
@@ -70,7 +48,16 @@ Pane {
Button {
id: attachButton
-
+ action: Action {
+ shortcut: "Ctrl+O"
+ onTriggered: {
+ if (attachButton.enabled) {
+ root.focus = true;
+ attachButton.focus = true;
+ attachButton.clicked();
+ }
+ }
+ }
visible: root.canSend
text: attachFileUrl.length > 0 ? qsTr("Detach") : qsTr("Attach")
hoverEnabled: true
@@ -110,10 +97,30 @@ Pane {
}
}
+
+ Button {
+ id: sendVChatUrl
+ hoverEnabled: true
+ ToolTip.visible: hovered
+ ToolTip.text: "Send videochat invitation"
+ text: "📞"
+ font.pixelSize: 20
+ }
Button {
id: sendButton
-
+ action: Action {
+ shortcut: "Ctrl+S"
+ onTriggered:{
+ if (sendButton.enabled) {
+ root.focus = true;
+ focus = true;
+ down = true;
+ clicked();
+ down = false;
+ }
+ }
+ }
hoverEnabled: true
ToolTip.visible: hovered
ToolTip.text: "Ctrl+S"
@@ -123,10 +130,8 @@ Pane {
text: qsTr("Send")
enabled: messageField.length > 0 | attachFileUrl.length > 0
onClicked: {
- sendButton.down = true;
let msg = root.createMessage();
root.context.sendMessage(root.chatId, msg);
- sendButton.down = false;
attachFileUrl = "";
messageField.text = "";
root.context.setDraft(chatId, null);