Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A8TNMgnEa7Kia5Wcz2kyDx
30 lines
751 B
QML
30 lines
751 B
QML
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 } }
|
|
}
|
|
}
|
|
}
|