forked from Shinonome/dots-hyprland
add hiding animation to hands
This commit is contained in:
@@ -198,10 +198,13 @@ Item {
|
|||||||
|
|
||||||
// Hour hand
|
// Hour hand
|
||||||
Item {
|
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
|
anchors.fill: parent
|
||||||
z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1
|
z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1
|
||||||
rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60)
|
rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60)
|
||||||
|
Behavior on opacity {
|
||||||
|
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||||
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
opacity: Config.options.background.clock.cookie.hourHandStyle !== "hide" ? 1.0 : 0
|
opacity: Config.options.background.clock.cookie.hourHandStyle !== "hide" ? 1.0 : 0
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -223,13 +226,16 @@ Item {
|
|||||||
|
|
||||||
// Minute hand
|
// Minute hand
|
||||||
Item {
|
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
|
anchors.fill: parent
|
||||||
z: Config.options.background.clock.cookie.minuteHandStyle === "thin" ? 1 : 3
|
z: Config.options.background.clock.cookie.minuteHandStyle === "thin" ? 1 : 3
|
||||||
rotation: -90 + (360 / 60) * root.clockMinute
|
rotation: -90 + (360 / 60) * root.clockMinute
|
||||||
Behavior on rotation{
|
Behavior on rotation{
|
||||||
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
|
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
|
Behavior on opacity {
|
||||||
|
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
|
||||||
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
x: Config.options.background.clock.cookie.minuteHandStyle === "classic" ? (parent.width / 2 - minuteHandWidth / 2) - 15 : parent.width / 2 - minuteHandWidth / 2
|
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",
|
icon: "radio",
|
||||||
value: "classic"
|
value: "classic"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
displayName: Translation.tr("Fill"),
|
|
||||||
icon: "stroke_full",
|
|
||||||
value: "fill"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Stroke"),
|
displayName: Translation.tr("Stroke"),
|
||||||
icon: "stroke_partial",
|
icon: "stroke_partial",
|
||||||
value: "stroke"
|
value: "stroke"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: Translation.tr("Fill"),
|
||||||
|
icon: "stroke_full",
|
||||||
|
value: "fill"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Hide"),
|
displayName: Translation.tr("Hide"),
|
||||||
icon: "deselect",
|
icon: "deselect",
|
||||||
|
|||||||
Reference in New Issue
Block a user