From 443662d2fdb85cedaeb710d87f6df2f23c80ce77 Mon Sep 17 00:00:00 2001 From: Yari Polla Date: Mon, 16 May 2022 20:15:48 +0200 Subject: [PATCH] mediacontrolwidget: use MarqueeLabel for title and artist --- .../mediacontrols/MediaControlsWidget.qml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/components/mobileshell/qml/widgets/mediacontrols/MediaControlsWidget.qml b/components/mobileshell/qml/widgets/mediacontrols/MediaControlsWidget.qml index ce127869..81bbdcf6 100644 --- a/components/mobileshell/qml/widgets/mediacontrols/MediaControlsWidget.qml +++ b/components/mobileshell/qml/widgets/mediacontrols/MediaControlsWidget.qml @@ -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" }