brightess and volume control
This commit is contained in:
40
Widgets/PercentIndicator.qml
Normal file
40
Widgets/PercentIndicator.qml
Normal file
@@ -0,0 +1,40 @@
|
||||
import Quickshell
|
||||
import QtQuick.Shapes
|
||||
import Quickshell.Services.Pipewire
|
||||
import QtQuick
|
||||
|
||||
Shape {
|
||||
id: root
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
property var percent
|
||||
ShapePath {
|
||||
capStyle: ShapePath.RoundCap
|
||||
fillColor: "transparent"
|
||||
strokeColor: "#333"
|
||||
strokeWidth: 2
|
||||
PathAngleArc {
|
||||
moveToStart: true
|
||||
centerX: root.width/2
|
||||
centerY: root.height/2
|
||||
radiusX: root.width/2
|
||||
radiusY: root.height/2
|
||||
startAngle: 90 + 40
|
||||
sweepAngle: 360 - 80
|
||||
}
|
||||
}
|
||||
ShapePath {
|
||||
capStyle: ShapePath.RoundCap
|
||||
fillColor: "transparent"
|
||||
strokeColor: "white"
|
||||
strokeWidth: 2
|
||||
PathAngleArc {
|
||||
moveToStart: true
|
||||
centerX: root.width/2
|
||||
centerY: root.height/2
|
||||
radiusX: root.width/2 - 1
|
||||
radiusY: root.height/2 - 1
|
||||
startAngle: 90 + 40
|
||||
sweepAngle: root.percent * (360 - 80)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user