This repository has been archived on 2026-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/mutable_config/quickshell/components/Shared/ProgressBar.qml
T

33 lines
986 B
QML

import QtQuick
import "."
// Sharp-cornered track+fill for OSD volume/brightness and similar level
// readouts, and the base for slider-style controls in Quick Settings.
Item {
id: bar
property real value: 0 // 0..1
property color fillColor: Theme.colors.primary
height: 10
Rectangle {
anchors.fill: parent
color: Theme.colors.surfaceHover
border.width: Theme.geometry.borderWidth
border.color: Theme.colors.crust
clip: true
Rectangle {
width: Math.max(0, parent.width * Math.max(0, Math.min(1, bar.value)) - parent.border.width * 2)
height: parent.height - parent.border.width * 2
x: parent.border.width
y: parent.border.width
color: bar.fillColor
Behavior on width { NumberAnimation { duration: Theme.animation.durationFast } }
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
}
}
}