Compare commits
2 Commits
a596dce33e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f4da4d479e | |||
| 1c97d6166d |
44
Corners.qml
Normal file
44
Corners.qml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import QtQuick
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
import './Widgets' as Widgets
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: corners
|
||||||
|
readonly property real radius: 12
|
||||||
|
Widgets.Corner {
|
||||||
|
anchors {
|
||||||
|
top: true
|
||||||
|
left: true
|
||||||
|
}
|
||||||
|
radius: corners.radius
|
||||||
|
angle: 0
|
||||||
|
fillColor: "black"
|
||||||
|
}
|
||||||
|
Widgets.Corner {
|
||||||
|
anchors {
|
||||||
|
bottom: true
|
||||||
|
left: true
|
||||||
|
}
|
||||||
|
radius: corners.radius
|
||||||
|
angle: 90
|
||||||
|
fillColor: "black"
|
||||||
|
}
|
||||||
|
Widgets.Corner {
|
||||||
|
anchors {
|
||||||
|
bottom: true
|
||||||
|
right: true
|
||||||
|
}
|
||||||
|
radius: corners.radius
|
||||||
|
angle: 180
|
||||||
|
fillColor: "black"
|
||||||
|
}
|
||||||
|
Widgets.Corner {
|
||||||
|
anchors {
|
||||||
|
top: true
|
||||||
|
right: true
|
||||||
|
}
|
||||||
|
radius: corners.radius
|
||||||
|
angle: 270
|
||||||
|
fillColor: "black"
|
||||||
|
}
|
||||||
|
}
|
||||||
2
Lock.qml
2
Lock.qml
@@ -79,7 +79,7 @@ WlSessionLock {
|
|||||||
ClippingRectangle {
|
ClippingRectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "white"
|
color: "white"
|
||||||
opacity: !lock.animate || capture.ready
|
opacity: capture.ready
|
||||||
radius: 0
|
radius: 0
|
||||||
RectangularShadow {
|
RectangularShadow {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
33
Wall.qml
33
Wall.qml
@@ -20,7 +20,7 @@ Variants {
|
|||||||
aboveWindows: false
|
aboveWindows: false
|
||||||
property var modelData
|
property var modelData
|
||||||
screen: modelData
|
screen: modelData
|
||||||
color: "#111"
|
color: "#000"
|
||||||
ClippingRectangle {
|
ClippingRectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Image {
|
Image {
|
||||||
@@ -30,10 +30,35 @@ Variants {
|
|||||||
}
|
}
|
||||||
radius: 40
|
radius: 40
|
||||||
PropertyAnimation on radius {
|
PropertyAnimation on radius {
|
||||||
to: 14
|
id: radiusAnimation
|
||||||
duration: 300
|
running: false
|
||||||
|
to: 16
|
||||||
|
duration: 1000
|
||||||
}
|
}
|
||||||
property real intro_progress: 0
|
transform: [
|
||||||
|
Translate {
|
||||||
|
y: 160
|
||||||
|
PropertyAnimation on y {
|
||||||
|
duration: 500
|
||||||
|
to: 0
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
onFinished: scaleAnimation.start()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Scale {
|
||||||
|
origin { x: width/2; y: height/2 }
|
||||||
|
xScale: 0.8
|
||||||
|
yScale: xScale
|
||||||
|
PropertyAnimation on xScale {
|
||||||
|
id: scaleAnimation
|
||||||
|
running: false
|
||||||
|
duration: 1000
|
||||||
|
to: 1
|
||||||
|
easing.type: Easing.InOutCubic
|
||||||
|
onStarted: radiusAnimation.start()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
52
Widgets/Corner.qml
Normal file
52
Widgets/Corner.qml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Shapes
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
import Quickshell.Wayland
|
||||||
|
|
||||||
|
PanelWindow {
|
||||||
|
id: corner
|
||||||
|
required property real radius
|
||||||
|
required property int angle
|
||||||
|
required property color fillColor
|
||||||
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
implicitWidth: corner.radius
|
||||||
|
implicitHeight: corner.radius
|
||||||
|
|
||||||
|
|
||||||
|
function anglePointX(angle) {
|
||||||
|
return (corner.radius * Math.sqrt(2) * 1/2 * Math.sin(angle)) + corner.radius/2
|
||||||
|
}
|
||||||
|
function anglePointY(angle) {
|
||||||
|
return (corner.radius * Math.sqrt(2) * 1/2 * Math.cos(angle)) + corner.radius/2
|
||||||
|
}
|
||||||
|
Shape {
|
||||||
|
anchors.fill: parent
|
||||||
|
preferredRendererType: Shape.CurveRenderer
|
||||||
|
|
||||||
|
ShapePath {
|
||||||
|
fillColor: corner.fillColor
|
||||||
|
strokeColor: "transparent"
|
||||||
|
startX: anglePointX(Math.PI * 5/4 + corner.angle * Math.PI/180)
|
||||||
|
startY: anglePointY(Math.PI * 5/4 + corner.angle * Math.PI/180)
|
||||||
|
PathLine {
|
||||||
|
x: anglePointX(Math.PI * 3/4 + corner.angle * Math.PI/180)
|
||||||
|
y: anglePointY(Math.PI * 3/4 + corner.angle * Math.PI/180)
|
||||||
|
}
|
||||||
|
PathAngleArc {
|
||||||
|
radiusX: corner.radius
|
||||||
|
radiusY: corner.radius
|
||||||
|
startAngle: 270 - corner.angle
|
||||||
|
sweepAngle: -90
|
||||||
|
centerX: anglePointX(Math.PI * 1/4 + corner.angle * Math.PI/180)
|
||||||
|
centerY: anglePointY(Math.PI * 1/4 + corner.angle * Math.PI/180)
|
||||||
|
}
|
||||||
|
PathLine {
|
||||||
|
x: anglePointX(Math.PI * 5/4 + corner.angle * Math.PI/180)
|
||||||
|
y: anglePointY(Math.PI * 5/4 + corner.angle * Math.PI/180)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user