feat: Add music and sysinfo to top bar (togglable) - also a bunch of misc fixes

This commit is contained in:
ferreo 2025-07-14 20:40:43 +01:00
parent e1caf737fe
commit b4697235c0
29 changed files with 795 additions and 399 deletions

View file

@ -5,26 +5,20 @@ Item {
id: root
property int innerRadius: 34
property int outerRadius: 48
property int barCount: 40
property color fillColor: "#fff"
property color strokeColor: "#fff"
property int strokeWidth: 0
property var values: []
width: outerRadius * 2
height: outerRadius * 2
// Cava input
Cava {
id: cava
count: root.barCount
}
Repeater {
model: root.barCount
model: root.values.length
Rectangle {
property real value: cava.values[index]
property real angle: (index / root.barCount) * 360
width: Math.max(2, (root.innerRadius * 2 * Math.PI) / root.barCount - 4)
property real value: root.values[index]
property real angle: (index / root.values.length) * 360
width: Math.max(2, (root.innerRadius * 2 * Math.PI) / root.values.length - 4)
height: value * (root.outerRadius - root.innerRadius)
radius: width / 2
color: root.fillColor
@ -32,8 +26,8 @@ Item {
border.width: root.strokeWidth
antialiasing: true
x: root.width / 2 + (root.innerRadius) * Math.cos(Math.PI/2 + 2 * Math.PI * index / root.barCount) - width / 2
y: root.height / 2 - (root.innerRadius) * Math.sin(Math.PI/2 + 2 * Math.PI * index / root.barCount) - height
x: root.width / 2 + (root.innerRadius) * Math.cos(Math.PI/2 + 2 * Math.PI * index / root.values.length) - width / 2
y: root.height / 2 - (root.innerRadius) * Math.sin(Math.PI/2 + 2 * Math.PI * index / root.values.length) - height
transform: Rotation {
origin.x: width / 2