/*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*/import QtQuickimport QtQuick.Layoutsimport org.kde.plasma.components 3.0 as PlasmaComponents3import org.kde.plasma.extras 2.0 as PlasmaExtrasimport org.kde.kirigami 2 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.implicitWidthPlasmaComponents3.Label {id: songTextparent: songTextWrapperwidth: parent.widthheight: undefinedlineHeight: 1maximumLineCount: 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 > 0PlasmaExtras.DescriptiveLabel {id: artistTextparent: artistTextWrapperwidth: parent.widthheight: undefinedwrapMode: Text.NoWraplineHeight: 1elide: 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()}}