/*SPDX-FileCopyrightText: 2013 Sebastian KΓΌgler <sebas@kde.org>SPDX-FileCopyrightText: 2014 Martin GrΓ€Γlin <mgraesslin@kde.org>SPDX-FileCopyrightText: 2016 Kai Uwe Broulik <kde@privat.broulik.de>SPDX-FileCopyrightText: 2017 Roman Gilg <subdiff@gmail.com>SPDX-FileCopyrightText: 2020 Nate Graham <nate@kde.org>SPDX-License-Identifier: LGPL-2.0-or-later*/pragma ComponentBehavior: Boundimport QtQuickimport QtQuick.Layoutsimport org.kde.plasma.components as PlasmaComponents3import org.kde.plasma.extras as PlasmaExtrasimport org.kde.kirigami as Kirigamiimport org.kde.plasma.private.mpris as MprisRowLayout {enabled: toolTipDelegate.playerData.canControlreadonly property bool isPlaying: toolTipDelegate.playerData.playbackStatus === Mpris.PlaybackStatus.PlayingColumnLayout {Layout.fillWidth: trueLayout.topMargin: Kirigami.Units.smallSpacingLayout.bottomMargin: Kirigami.Units.smallSpacingLayout.rightMargin: isWin ? Kirigami.Units.smallSpacing : Kirigami.Units.gridUnitspacing: 0ScrollableTextWrapper {id: songTextWrapperLayout.fillWidth: trueLayout.preferredHeight: songText.heightimplicitWidth: songText.implicitWidthtextItem: PlasmaComponents3.Label {id: songTextmaximumLineCount: artistText.visible ? 1 : 2wrapMode: Text.NoWrapelide: parent.state ? Text.ElideNone : Text.ElideRighttext: toolTipDelegate.playerData.tracktextFormat: Text.PlainText}}ScrollableTextWrapper {id: artistTextWrapperLayout.fillWidth: trueLayout.preferredHeight: artistText.heightimplicitWidth: artistText.implicitWidthvisible: artistText.text.length > 0textItem: PlasmaExtras.DescriptiveLabel {id: artistTextwrapMode: Text.NoWrapelide: parent.state ? Text.ElideNone : Text.ElideRighttext: toolTipDelegate.playerData.artistfont: Kirigami.Theme.smallFonttextFormat: Text.PlainText}}}PlasmaComponents3.ToolButton {enabled: toolTipDelegate.playerData.canGoPreviousicon.name: mirrored ? "media-skip-forward" : "media-skip-backward"onClicked: toolTipDelegate.playerData.Previous()}PlasmaComponents3.ToolButton {enabled: isPlaying ? toolTipDelegate.playerData.canPause : toolTipDelegate.playerData.canPlayicon.name: isPlaying ? "media-playback-pause" : "media-playback-start"onClicked: {if (!isPlaying) {toolTipDelegate.playerData.Play();} else {toolTipDelegate.playerData.Pause();}}}PlasmaComponents3.ToolButton {enabled: toolTipDelegate.playerData.canGoNexticon.name: mirrored ? "media-skip-backward" : "media-skip-forward"onClicked: toolTipDelegate.playerData.Next()}}