added a lil' fella
This commit is contained in:
@@ -10,6 +10,7 @@ Row {
|
||||
property string artist: ""
|
||||
property string title: ""
|
||||
property string artUrl: ""
|
||||
property bool isPlaying: false
|
||||
property int maxTextLength: 50
|
||||
|
||||
property int numBands: 32
|
||||
@@ -20,9 +21,20 @@ Row {
|
||||
return fullText.length > maxTextLength ? fullText.substring(0, maxTextLength - 3) + "..." : fullText;
|
||||
}
|
||||
|
||||
property string dancingLeft: "└(ಠ_ಠ )┐"
|
||||
property string dancingRight: "┌( ಠ_ಠ)┘"
|
||||
property string notDancing: "(ಠ ∩ ಠ)"
|
||||
|
||||
visible: title !== ""
|
||||
spacing: 6
|
||||
|
||||
Text {
|
||||
id: littleFella
|
||||
text: root.dancingLeft
|
||||
color: Colors.md3.primary
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
//TODO add service that reads the data from cava
|
||||
// the fifo buffer is in /tmp/cava.fifo. Example data is:
|
||||
// 5;3;3;3;2;1;1;3;6;18;42;16;6;6;1;1;2;6;2;3;6;6;5;11;11;12;13;66;4;4;24;2;2;24;4;4;66;13;12;11;11;5;6;6;3;2;3;2;1;1;6;6;16;42;19;5;2;1;1;2;3;4;3;7;
|
||||
@@ -47,11 +59,24 @@ Row {
|
||||
// z: 1
|
||||
}
|
||||
|
||||
Item {
|
||||
id: titleArea
|
||||
anchors.bottom: parent.bottom
|
||||
width: titleText.implicitWidth
|
||||
height: Math.max(titleText.implicitHeight, visualizer.height)
|
||||
Timer {
|
||||
interval: 400
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
if (root.isPlaying) {
|
||||
littleFella.text = littleFella.text === root.dancingLeft ? root.dancingRight : root.dancingLeft;
|
||||
} else {
|
||||
littleFella.text = root.notDancing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Item {
|
||||
// id: titleArea
|
||||
// anchors.bottom: parent.bottom
|
||||
// width: titleText.implicitWidth
|
||||
// height: Math.max(titleText.implicitHeight, visualizer.height)
|
||||
|
||||
// Canvas {
|
||||
// id: visualizer
|
||||
@@ -133,7 +158,7 @@ Row {
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// }
|
||||
|
||||
// CavaService {
|
||||
// id: cavaService
|
||||
|
||||
Reference in New Issue
Block a user