1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-14 22:42:34 +02:00

Add Qt MM based wallpaper property changes

This commit is contained in:
Elias Steurer 2021-12-18 12:40:25 +01:00
parent b9d309c08f
commit 5fba1df486

View File

@ -38,10 +38,35 @@ Item {
VideoOutput {
id: vo
anchors.fill: parent
}
AudioOutput {
id: ao
volume: Wallpaper.volume
muted: Wallpaper.muted
}
Connections {
function onFillModeChanged(fillMode) {
if(fillMode === "stretch"){
vo.fillMode = VideoOutput.Stretch
return
}
if(fillMode === "fill"){
vo.fillMode = VideoOutput.PreserveAspectFit
return
}
if(fillMode === "contain" || fillMode === "cover" || fillMode === "scale-down"){
vo.fillMode = VideoOutput.PreserveAspectCrop
}
}
function onCurrentTimeChanged(currentTime) {
mediaPlayer.position = currentTime * mediaPlayer.duration
}
target: Wallpaper
}
}