diff options
author | Alexandre Moreno <alexmorenocano@gmail.com> | 2015-10-25 01:18:01 +0800 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-10-24 20:40:01 +0300 |
commit | a23202562acfa39dc0e3fc95cc21131da781b931 (patch) | |
tree | 3729852d16ee654100e23c5a5bd2bb00176b6538 | |
parent | 88f66f9572fcf0eadb2ab7ed2aafe4a6f9a94fcf (diff) |
qt: hide playbar properly
Fixes #120
-rw-r--r-- | qt/main.qml | 39 |
1 files 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 |