mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
add animation to stroke hour hand
This commit is contained in:
@@ -16,7 +16,13 @@ Item {
|
||||
property real handWidth: 16
|
||||
property string style: "fill"
|
||||
property color color: Appearance.colors.colPrimary
|
||||
|
||||
property real fillColorAlpha: root.style === "stroke" ? 0.0 : 1.0 // for animation
|
||||
Behavior on fillColorAlpha {
|
||||
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
|
||||
rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60)
|
||||
z: root.style === "fill" ? 3 : 1
|
||||
|
||||
@@ -36,7 +42,7 @@ Item {
|
||||
height: root.style === "classic" ? 8 : handWidth
|
||||
|
||||
radius: root.style === "classic" ? 2 : handWidth / 2
|
||||
color : root.style === "stroke" ? "transparent" : root.color
|
||||
color : Qt.rgba(root.color.r, root.color.g, root.color.b, fillColorAlpha)
|
||||
|
||||
border.color: root.color
|
||||
border.width: 4
|
||||
|
||||
Reference in New Issue
Block a user