mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-27 14:33:08 +00:00
mediacontrolwidget: use MarqueeLabel for title and artist
This commit is contained in:
parent
4c83a3e422
commit
443662d2fd
1 changed files with 6 additions and 10 deletions
|
|
@ -103,26 +103,22 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: Kirigami.Units.smallSpacing
|
spacing: Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
QQC2.Label {
|
Components.MarqueeLabel {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.NoWrap
|
|
||||||
elide: Text.ElideRight
|
inputText: mpris2Source.track(playerItem.source) || i18n("No media playing")
|
||||||
text: mpris2Source.track(playerItem.source) || i18n("No media playing")
|
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize
|
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize
|
||||||
maximumLineCount: 1
|
|
||||||
color: "white"
|
color: "white"
|
||||||
}
|
}
|
||||||
|
|
||||||
QQC2.Label {
|
Components.MarqueeLabel {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.NoWrap
|
|
||||||
elide: Text.ElideRight
|
|
||||||
// if no artist is given, show player name instead
|
// 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
|
textFormat: Text.PlainText
|
||||||
font.pointSize: PlasmaCore.Theme.smallestFont.pointSize
|
font.pointSize: PlasmaCore.Theme.smallestFont.pointSize
|
||||||
maximumLineCount: 1
|
|
||||||
opacity: 0.9
|
opacity: 0.9
|
||||||
color: "white"
|
color: "white"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue