mediacontrolwidget: use MarqueeLabel for title and artist

This commit is contained in:
Yari Polla 2022-05-16 20:15:48 +02:00
parent 4c83a3e422
commit 443662d2fd

View file

@ -103,26 +103,22 @@ Item {
Layout.fillWidth: true
spacing: Kirigami.Units.smallSpacing
QQC2.Label {
Components.MarqueeLabel {
Layout.fillWidth: true
wrapMode: Text.NoWrap
elide: Text.ElideRight
text: mpris2Source.track(playerItem.source) || i18n("No media playing")
inputText: mpris2Source.track(playerItem.source) || i18n("No media playing")
textFormat: Text.PlainText
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize
maximumLineCount: 1
color: "white"
}
QQC2.Label {
Components.MarqueeLabel {
Layout.fillWidth: true
wrapMode: Text.NoWrap
elide: Text.ElideRight
// if no artist is given, show player name instead
text: mpris2Source.artist(playerItem.source) || modelData.application || ""
inputText: mpris2Source.artist(playerItem.source) || modelData.application || ""
textFormat: Text.PlainText
font.pointSize: PlasmaCore.Theme.smallestFont.pointSize
maximumLineCount: 1
opacity: 0.9
color: "white"
}