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

Fix recursive property set

This commit is contained in:
Elias Steurer 2021-12-18 11:47:55 +01:00
parent b1387ce4a8
commit 7263204616

View File

@ -175,12 +175,10 @@ Rectangle {
property bool isMuted: false
onIsMutedChanged: {
if (miMuteAll.isMuted) {
isMuted = false
miMuteAll.icon.source = "qrc:/assets/icons/icon_volume.svg"
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted",
"false")
} else {
isMuted = true
miMuteAll.icon.source = "qrc:/assets/icons/icon_volume_mute.svg"
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted",
"true")
@ -198,22 +196,19 @@ Rectangle {
icon.source: "qrc:/assets/icons/icon_pause.svg"
icon.width: root.iconWidth
icon.height: root.iconHeight
property bool isPlaying: false
onClicked: isPlaying = !isPlaying
property bool isPlaying: true
onIsPlayingChanged:{
if (miStopAll.isPlaying) {
isPlaying = false
miStopAll.icon.source = "qrc:/assets/icons/icon_pause.svg"
ScreenPlay.screenPlayManager.setAllWallpaperValue(
"isPlaying", "true")
} else {
isPlaying = true
miStopAll.icon.source = "qrc:/assets/icons/icon_play.svg"
ScreenPlay.screenPlayManager.setAllWallpaperValue(
"isPlaying", "false")
}
}
onClicked: isPlaying = !isPlaying
hoverEnabled: true
ToolTip.text: qsTr("Pause/Play all Wallpaper")
ToolTip.visible: hovered