Compare commits
2 commits
2852735d70
...
00a46ac6ec
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00a46ac6ec | ||
|
|
e75c86e056 |
3 changed files with 14 additions and 10 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import "components"
|
||||
import "components/mpris"
|
||||
import "../../config/"
|
||||
|
||||
Scope {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ Item {
|
|||
id: root
|
||||
|
||||
property int currentIndex: 0
|
||||
property var players: Mpris.players
|
||||
|
||||
implicitWidth: childrenRect.width
|
||||
implicitHeight: childrenRect.height
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
Repeater {
|
||||
id: players
|
||||
|
|
@ -16,6 +16,9 @@ Item {
|
|||
|
||||
Player {
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
visible: index === root.currentIndex && modelData.canControl
|
||||
|
||||
onNextPlayer: {
|
||||
|
|
@ -1,25 +1,25 @@
|
|||
import Quickshell
|
||||
import Quickshell.Services.Mpris
|
||||
import QtQuick
|
||||
import "../../../styled/"
|
||||
import "../../../config/"
|
||||
import "../../../../styled/"
|
||||
import "../../../../config/"
|
||||
|
||||
Item {
|
||||
required property MprisPlayer modelData
|
||||
required property int index
|
||||
|
||||
signal nextPlayer()
|
||||
signal previousPlayer()
|
||||
signal nextPlayer
|
||||
signal previousPlayer
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
implicitWidth: childrenRect.width
|
||||
implicitWidth: text.width
|
||||
implicitHeight: Dimensions.mpris.height
|
||||
|
||||
StyledLabel {
|
||||
anchors.fill: parent
|
||||
anchors.fill: text
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: text
|
||||
text: `${modelData.isPlaying ? "" : ""} ${modelData.trackTitle} - ${modelData.trackArtist}`
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
@ -32,7 +32,7 @@ Item {
|
|||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
anchors.fill: text
|
||||
|
||||
onClicked: {
|
||||
if (!modelData.canTogglePlaying) {
|
||||
Loading…
Add table
Reference in a new issue