Merge status bar and launcher into morphing top bar
This commit is contained in:
36
Widgets/Workspaces.qml
Normal file
36
Widgets/Workspaces.qml
Normal file
@@ -0,0 +1,36 @@
|
||||
import QtQuick
|
||||
import QtQuick.Shapes
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Row {
|
||||
Repeater {
|
||||
model: 9
|
||||
delegate: Shape {
|
||||
height: 14
|
||||
width: 24
|
||||
property var workspace: Hyprland.workspaces.values.find(ws => ws.id === modelData+1)
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
ShapePath {
|
||||
strokeWidth: workspace ? 7 : 4
|
||||
Behavior on strokeWidth {NumberAnimation {
|
||||
duration: 150
|
||||
}}
|
||||
strokeColor: "white"
|
||||
fillColor: "transparent"
|
||||
PathAngleArc {
|
||||
moveToStart: true
|
||||
centerX: width/2
|
||||
centerY: height/2
|
||||
startAngle: 0
|
||||
sweepAngle: 360
|
||||
radiusX: workspace ? 3.5 : 5
|
||||
Behavior on radiusX {NumberAnimation {
|
||||
duration: 150
|
||||
}}
|
||||
radiusY: radiusX
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user