| 1 |
/**************************************************************************************** |
| 2 |
* Copyright (c) 2017 Malte Veerman <[email protected]> * |
| 3 |
* * |
| 4 |
* This program is free software; you can redistribute it and/or modify it under * |
| 5 |
* the terms of the GNU General Public License as published by the Free Software * |
| 6 |
* Foundation; either version 2 of the License, or (at your option) any later * |
| 7 |
* version. * |
| 8 |
* * |
| 9 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY * |
| 10 |
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * |
| 11 |
* PARTICULAR PURPOSE. See the GNU General Public License for more details. * |
| 12 |
* * |
| 13 |
* You should have received a copy of the GNU General Public License along with * |
| 14 |
* this program. If not, see <http://www.gnu.org/licenses/>. * |
| 15 |
****************************************************************************************/ |
| 16 |
|
| 17 |
import QtQuick 2.15 |
| 18 |
import QtQuick.Controls 2.15 |
| 19 |
import QtQuick.Layouts 1.15 |
| 20 |
import org.kde.kirigami 2.14 as Kirigami |
| 21 |
import org.kde.amarok.currenttrack 1.0 |
| 22 |
|
| 23 |
ColumnLayout { |
| 24 |
id: root |
| 25 |
|
| 26 |
property alias title: titleLabel.text |
| 27 |
property alias album: albumLabel.text |
| 28 |
property alias artist: artistLabel.text |
| 29 |
|
| 30 |
spacing: Kirigami.Units.smallSpacing |
| 31 |
|
| 32 |
Label { |
| 33 |
id: titleLabel |
| 34 |
|
| 35 |
text: CurrentTrackEngine.track |
| 36 |
textFormat: Text.PlainText |
| 37 |
|
| 38 |
Layout.fillHeight: true |
| 39 |
Layout.fillWidth: true |
| 40 |
|
| 41 |
horizontalAlignment: Text.AlignLeft |
| 42 |
verticalAlignment: Text.AlignVCenter |
| 43 |
color: Kirigami.Theme.textColor |
| 44 |
maximumLineCount: 1 |
| 45 |
fontSizeMode: Text.Fit |
| 46 |
font.pointSize: root.parent.flow == GridLayout.TopToBottom ? 24 : 32 |
| 47 |
minimumPointSize: 12 |
| 48 |
elide: Text.ElideRight |
| 49 |
|
| 50 |
CopyArea { |
| 51 |
targetText: titleLabel.text |
| 52 |
} |
| 53 |
} |
| 54 |
Label { |
| 55 |
id: artistLabel |
| 56 |
|
| 57 |
text: CurrentTrackEngine.artist |
| 58 |
textFormat: Text.PlainText |
| 59 |
|
| 60 |
Layout.fillHeight: true |
| 61 |
Layout.fillWidth: true |
| 62 |
|
| 63 |
horizontalAlignment: Text.AlignLeft |
| 64 |
verticalAlignment: Text.AlignVCenter |
| 65 |
color: Kirigami.Theme.textColor |
| 66 |
maximumLineCount: 1 |
| 67 |
fontSizeMode: Text.Fit |
| 68 |
font.pointSize: root.parent.flow == GridLayout.TopToBottom ? 24 : 32 |
| 69 |
font.italic: true |
| 70 |
minimumPointSize: 12 |
| 71 |
elide: Text.ElideRight |
| 72 |
|
| 73 |
CopyArea { |
| 74 |
targetText: artistLabel.text |
| 75 |
} |
| 76 |
} |
| 77 |
Label { |
| 78 |
id: albumLabel |
| 79 |
|
| 80 |
text: CurrentTrackEngine.album |
| 81 |
textFormat: Text.PlainText |
| 82 |
|
| 83 |
Layout.fillHeight: true |
| 84 |
Layout.fillWidth: true |
| 85 |
|
| 86 |
horizontalAlignment: Text.AlignLeft |
| 87 |
verticalAlignment: Text.AlignVCenter |
| 88 |
color: Kirigami.Theme.textColor |
| 89 |
maximumLineCount: 1 |
| 90 |
fontSizeMode: Text.Fit |
| 91 |
font.pointSize: root.parent.flow == GridLayout.TopToBottom ? 24 : 32 |
| 92 |
minimumPointSize: 12 |
| 93 |
elide: Text.ElideRight |
| 94 |
|
| 95 |
CopyArea { |
| 96 |
targetText: albumLabel.text |
| 97 |
} |
| 98 |
} |
| 99 |
} |