mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-22 10:42:29 +01:00
Add short delay before pausing to wait for...
potential window animation to finish
This commit is contained in:
parent
ad10683a74
commit
ea5c5033fb
@ -55,7 +55,16 @@ Item {
|
||||
volume: Wallpaper.volume
|
||||
muted: Wallpaper.muted
|
||||
}
|
||||
// Wait until Windows window animation is complete
|
||||
// before pausing the wallpaper
|
||||
Timer {
|
||||
id: pauseTimer
|
||||
interval: 100
|
||||
onTriggered: {
|
||||
mediaPlayer.pause()
|
||||
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
function onFillModeChanged(fillMode) {
|
||||
if (fillMode === "stretch") {
|
||||
@ -76,10 +85,11 @@ Item {
|
||||
}
|
||||
|
||||
function onVisualsPausedChanged(visualsPaused) {
|
||||
print(visualsPaused)
|
||||
if(!Wallpaper.isPlaying)
|
||||
return
|
||||
if(visualsPaused)
|
||||
mediaPlayer.pause()
|
||||
pauseTimer.start()
|
||||
else
|
||||
mediaPlayer.play()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user