simple dashboard
only has mpris
This commit is contained in:
parent
556a24774a
commit
0a33022c6a
6 changed files with 111 additions and 27 deletions
|
|
@ -10,17 +10,8 @@ import QtQuick.Layouts
|
|||
StyledButton {
|
||||
id: root
|
||||
|
||||
padding: 6
|
||||
|
||||
onClicked: {
|
||||
if (!Mpris.active.canTogglePlaying) {
|
||||
return;
|
||||
}
|
||||
if (Mpris.active.isPlaying) {
|
||||
Mpris.active.pause();
|
||||
} else {
|
||||
Mpris.active.play();
|
||||
}
|
||||
Visibility.dashboard = !Visibility.dashboard;
|
||||
}
|
||||
|
||||
content: ColumnLayout {
|
||||
|
|
@ -56,22 +47,5 @@ StyledButton {
|
|||
}
|
||||
}
|
||||
}
|
||||
StyledSlider {
|
||||
from: 0
|
||||
to: Mpris.active?.length ?? 0
|
||||
value: Mpris.active?.position
|
||||
implicitHeight: 6
|
||||
Layout.fillWidth: true
|
||||
onMoved: {
|
||||
Mpris.active.position = value;
|
||||
}
|
||||
|
||||
Timer {
|
||||
running: Mpris.active?.isPlaying
|
||||
interval: 1000
|
||||
repeat: true
|
||||
onTriggered: Mpris.active?.positionChanged()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue