add hiding animation to hands

This commit is contained in:
darksignal7
2025-10-05 20:07:03 +03:00
parent 692172d57b
commit 02631da9f1
2 changed files with 13 additions and 7 deletions
@@ -198,10 +198,13 @@ Item {
// Hour hand
Item {
visible: Config.options.background.clock.cookie.hourHandStyle === "hide" ? false : true
opacity: Config.options.background.clock.cookie.hourHandStyle === "hide" ? 0.0 : 1.0
anchors.fill: parent
z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1
rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60)
Behavior on opacity {
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
}
Rectangle {
opacity: Config.options.background.clock.cookie.hourHandStyle !== "hide" ? 1.0 : 0
anchors.verticalCenter: parent.verticalCenter
@@ -223,13 +226,16 @@ Item {
// Minute hand
Item {
visible: Config.options.background.clock.cookie.minuteHandStyle === "hide" ? false : true
opacity: Config.options.background.clock.cookie.minuteHandStyle === "hide" ? 0.0 : 1.0
anchors.fill: parent
z: Config.options.background.clock.cookie.minuteHandStyle === "thin" ? 1 : 3
rotation: -90 + (360 / 60) * root.clockMinute
Behavior on rotation{
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
}
Behavior on opacity {
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
}
Rectangle {
anchors.verticalCenter: parent.verticalCenter
x: Config.options.background.clock.cookie.minuteHandStyle === "classic" ? (parent.width / 2 - minuteHandWidth / 2) - 15 : parent.width / 2 - minuteHandWidth / 2
@@ -134,16 +134,16 @@ ContentPage {
icon: "radio",
value: "classic"
},
{
displayName: Translation.tr("Fill"),
icon: "stroke_full",
value: "fill"
},
{
displayName: Translation.tr("Stroke"),
icon: "stroke_partial",
value: "stroke"
},
{
displayName: Translation.tr("Fill"),
icon: "stroke_full",
value: "fill"
},
{
displayName: Translation.tr("Hide"),
icon: "deselect",