pragma ComponentBehavior: Bound import QtQuick import "../../services" import "../../theme" // Cava bars for system audio: rising bars, or mirrored around the centre line. Face { id: root // Cava runs only while this widget's desktop is visible. Demand { service: CavaService counter: "widgetConsumers" active: root.desktopVisible } readonly property bool mirror: variant === "mirror" Row { id: bars anchors.fill: parent anchors.margins: 6 spacing: Math.max(2, width / 24 * 0.3) Repeater { model: 24 Item { id: column required property int index readonly property real level: Math.max(0.03, CavaService.bars[index] || 0) width: (bars.width - bars.spacing * 23) / 24 height: bars.height Rectangle { width: parent.width height: Math.max(width, column.height * column.level) y: root.mirror ? (column.height - height) / 2 : column.height - height radius: width / 2 color: Qt.alpha(Theme.accentVivid, 0.55 + column.level * 0.45) Behavior on height { NumberAnimation { duration: 60 } } } } } } }