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