import QtQuick import "." // Colored fill bar for OSD volume/brightness and similar level readouts. Item { id: bar property real value: 0 // 0..1 property color fillColor: Theme.colors.primary height: 8 Rectangle { anchors.fill: parent color: Theme.colors.surfaceHover radius: height / 2 clip: true Rectangle { width: parent.width * Math.max(0, Math.min(1, bar.value)) height: parent.height radius: parent.radius color: bar.fillColor Behavior on width { NumberAnimation { duration: Theme.animation.durationFast } } Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } } } } }