playback/player: qt: do not hide playbar if it contains cursor

This commit is contained in:
Alexandre Moreno 2015-10-31 11:09:27 +08:00 committed by Sebastian Dröge
parent afd72fe79e
commit a8f242d48c

View file

@ -77,8 +77,10 @@ ApplicationWindow {
id: hidetimer id: hidetimer
interval: 5000 interval: 5000
onTriggered: { onTriggered: {
if (!playbarMouseArea.containsMouse) {
playbar.opacity = 0.0 playbar.opacity = 0.0
settings.visible = false settings.visible = false
}
stop() stop()
} }
} }
@ -101,6 +103,8 @@ ApplicationWindow {
source: "fonts/fontawesome-webfont.ttf" source: "fonts/fontawesome-webfont.ttf"
} }
Rectangle { Rectangle {
id : playbar id : playbar
color: Qt.rgba(1, 1, 1, 0.7) color: Qt.rgba(1, 1, 1, 0.7)
@ -112,6 +116,13 @@ ApplicationWindow {
width : grid.width + 20 width : grid.width + 20
height: 40//childrenRect.height + 20 height: 40//childrenRect.height + 20
radius: 5 radius: 5
focus: true
MouseArea {
id: playbarMouseArea
anchors.fill: parent
hoverEnabled: true
}
Rectangle { Rectangle {
id: settings id: settings