From a23202562acfa39dc0e3fc95cc21131da781b931 Mon Sep 17 00:00:00 2001 From: Alexandre Moreno Date: Sun, 25 Oct 2015 01:18:01 +0800 Subject: qt: hide playbar properly Fixes #120 --- qt/main.qml | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/qt/main.qml b/qt/main.qml index c75a7b3..d06b0d4 100644 --- a/qt/main.qml +++ b/qt/main.qml @@ -64,6 +64,25 @@ ApplicationWindow { height: parent.height } + MouseArea { + anchors.fill: parent + hoverEnabled: true + onPositionChanged: { + playbar.opacity = 1.0 + hidetimer.start() + } + } + + Timer { + id: hidetimer + interval: 5000 + onTriggered: { + playbar.opacity = 0.0 + settings.visible = false + stop() + } + } + FileDialog { id: fileDialog //nameFilters: [TODO globs from mime types] @@ -94,26 +113,6 @@ ApplicationWindow { height: 40//childrenRect.height + 20 radius: 5 - MouseArea { - id: mousearea - anchors.fill: parent - hoverEnabled: true - onEntered: { - parent.opacity = 1.0 - hidetimer.start() - } - } - - Timer { - id: hidetimer - interval: 10000 - onTriggered: { - parent.opacity = 0.0 - settings.visible = false - stop() - } - } - Rectangle { id: settings width: 150; height: settingsView.contentHeight -- cgit v1.2.3