add now playing info
This commit is contained in:
33
quickshell/ui/NowPlaying.qml
Normal file
33
quickshell/ui/NowPlaying.qml
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../constants"
|
||||
|
||||
Row {
|
||||
id: root
|
||||
|
||||
property string artist: ""
|
||||
property string title: ""
|
||||
property string artUrl: ""
|
||||
|
||||
visible: title !== ""
|
||||
spacing: 6
|
||||
|
||||
Image {
|
||||
width: 18
|
||||
height: 18
|
||||
source: root.artUrl
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
text: root.artist !== "" ? (root.artist + " - " + root.title) : root.title
|
||||
color: Colors.md3.primary
|
||||
font.family: Constants.fontFamily
|
||||
font.pixelSize: Constants.fontSize
|
||||
elide: Text.ElideRight
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user