mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
more detailed player info in selection
This commit is contained in:
@@ -585,7 +585,18 @@ Item {
|
|||||||
width: parent.width - 20 - Theme.spacingM * 2
|
width: parent.width - 20 - Theme.spacingM * 2
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: modelData && modelData.identity ? modelData.identity : "Unknown Player"
|
text: {
|
||||||
|
if (!modelData) return "Unknown Player"
|
||||||
|
|
||||||
|
const identity = modelData.identity || "Unknown Player"
|
||||||
|
const trackTitle = modelData.trackTitle || ""
|
||||||
|
|
||||||
|
if (trackTitle.length > 0) {
|
||||||
|
return identity + " - " + trackTitle
|
||||||
|
}
|
||||||
|
|
||||||
|
return identity
|
||||||
|
}
|
||||||
font.pixelSize: Theme.fontSizeMedium
|
font.pixelSize: Theme.fontSizeMedium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
font.weight: modelData === activePlayer ? Font.Medium : Font.Normal
|
font.weight: modelData === activePlayer ? Font.Medium : Font.Normal
|
||||||
@@ -595,7 +606,18 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: modelData === activePlayer ? "Active" : "Available"
|
text: {
|
||||||
|
if (!modelData) return ""
|
||||||
|
|
||||||
|
const artist = modelData.trackArtist || ""
|
||||||
|
const isActive = modelData === activePlayer
|
||||||
|
|
||||||
|
if (artist.length > 0) {
|
||||||
|
return artist + (isActive ? " (Active)" : "")
|
||||||
|
}
|
||||||
|
|
||||||
|
return isActive ? "Active" : "Available"
|
||||||
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: Theme.surfaceVariantText
|
color: Theme.surfaceVariantText
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|||||||
Reference in New Issue
Block a user