summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Gottfried <sebastian.gottfried@posteo.de>2016-10-24 17:15:57 (GMT)
committerSebastian Gottfried <sebastian.gottfried@posteo.de>2016-10-24 17:15:57 (GMT)
commit6c65872ee25eb7082723d6280f451b8d75a0597b (patch)
treeadc4f48b1812d4c6e128c6fd03c9c291eea7bbdf
parent9fe18509b9090561b56b87f4bbdc77c11f0147f0 (diff)
Training Screen: Activate Menu With Escape
Now there is a handy shortcut to pause the training session. Closing the menu works the same way.
-rw-r--r--src/qml/TrainingScreen.qml16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/qml/TrainingScreen.qml b/src/qml/TrainingScreen.qml
index 71c3403..69b1a14 100644
--- a/src/qml/TrainingScreen.qml
+++ b/src/qml/TrainingScreen.qml
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import QtQuick 2.4
+import QtQuick 2.5
import QtQuick.Controls 1.3
import QtQuick.Layouts 1.1
import ktouch 1.0
@@ -122,6 +122,20 @@ FocusScope {
id: referenceStats
}
+ Shortcut {
+ sequence: "Escape"
+ enabled: screen.visible
+ onActivated: {
+ if (menuOverlay.opacity === 0) {
+ menuOverlay.show()
+ }
+ else {
+ menuOverlay.hide()
+ }
+ }
+
+ }
+
ColumnLayout {
id: screenContent