mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-05 10:32:28 +01:00
Add Qt MM based wallpaper property changes
This commit is contained in:
parent
b9d309c08f
commit
5fba1df486
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user