From 074ced68441f0af96b13645918de64bfba01c34f Mon Sep 17 00:00:00 2001 From: NamedKitten Date: Sat, 17 Nov 2018 20:28:07 +0000 Subject: [PATCH] [UI] Added more ways to toggle fullscreen. --- src/qml/main.qml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/qml/main.qml b/src/qml/main.qml index 3a7fd04..dc2c7bd 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -139,7 +139,7 @@ ApplicationWindow { controlsBar.background.visible = false titleBar.visible = false titleBackground.visible = false - menuBar.visible = false + menuBar.visible = false; mouseAreaPlayer.cursorShape = Qt.BlankCursor } } @@ -189,14 +189,33 @@ ApplicationWindow { anchors.top: titleBar.bottom anchors.topMargin: 0 hoverEnabled: true + onDoubleClicked: { + playTimer.stop() + toggleFullscreen() + } + Action { + onTriggered: { + if (mainWindow.visibility == Window.FullScreen) {toggleFullscreen()} + } + shortcut: "Esc" + } + Timer { + id: playTimer + interval: 200 + running: false + repeat: false + onTriggered: { + player.playerCommand(Enums.Commands.TogglePlayPause) + } + } onClicked: { if (appearance.clickToPause) { - player.playerCommand(Enums.Commands.TogglePlayPause) + playTimer.start() } } Timer { id: mouseAreaPlayerTimer - interval: 1000 + interval: 2000 running: true repeat: false onTriggered: {