Different cover actions depending on application state
This commit is contained in:
parent
85321b5a56
commit
cc678fbccb
1 changed files with 14 additions and 15 deletions
|
@ -36,26 +36,25 @@ CoverBackground {
|
||||||
}
|
}
|
||||||
|
|
||||||
CoverActionList {
|
CoverActionList {
|
||||||
|
enabled: player.episode != 0 && player.isPlaying
|
||||||
|
|
||||||
CoverAction {
|
CoverAction {
|
||||||
iconSource: 'image://theme/icon-cover-' + (player.isPlaying ? 'pause' : 'play')
|
iconSource: 'image://theme/icon-cover-pause'
|
||||||
onTriggered: {
|
onTriggered: player.pause();
|
||||||
if (player.episode != 0) {
|
|
||||||
if (player.isPlaying) {
|
|
||||||
player.pause();
|
|
||||||
} else {
|
|
||||||
player.play();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoverAction {
|
CoverAction {
|
||||||
iconSource: 'image://theme/icon-cover-next-song'
|
iconSource: 'image://theme/icon-cover-next-song'
|
||||||
onTriggered: {
|
onTriggered: player.seekAndSync(player.position + 1000 * 30);
|
||||||
if (player.episode != 0 && player.isPlaying) {
|
}
|
||||||
player.seekAndSync(player.position + 1000 * 30);
|
}
|
||||||
}
|
|
||||||
}
|
CoverActionList {
|
||||||
|
enabled: player.episode != 0 && !player.isPlaying
|
||||||
|
|
||||||
|
CoverAction {
|
||||||
|
iconSource: 'image://theme/icon-cover-play'
|
||||||
|
onTriggered: player.play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue