From 48c2a5d7789d742631f8774ad8969d70e5ed0b2e Mon Sep 17 00:00:00 2001 From: Miquel Lionel Date: Thu, 21 Oct 2021 20:18:32 +0100 Subject: 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 --- qml/Message.qml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'qml/Message.qml') diff --git a/qml/Message.qml b/qml/Message.qml index fc69e8f..86ae397 100644 --- a/qml/Message.qml +++ b/qml/Message.qml @@ -128,7 +128,12 @@ RowLayout { source: Qt.resolvedUrl("file:" + root.message.file) onError: console.log("Audio MediaPlayer error: " + errorString) - onPlaybackStateChanged: playbackState == 1 ? audioBtn.text = "pause" : audioBtn.text = "play" + onPlaybackStateChanged: { + if (playbackState == 1) + audioBtn.text = "\u23F8 pause"; + else + audioBtn.text = "\u25B6 play"; + } } Label { @@ -141,8 +146,13 @@ RowLayout { Button { id: audioBtn - text: "play" - onPressed: player.playbackState == 1 ? player.pause() : player.play() + text: "\u25B6 play" + onPressed: { + if (player.playbackState == 1) + player.pause(); + else + player.play(); + } } } @@ -217,8 +227,7 @@ RowLayout { Button { padding: 5 - icon.name: "document-save-as" - text: "Save attachment" + text: "

\u2B07

Save attachment" onClicked: saveAsDialog.open() } -- cgit v1.2.3-70-g09d2