fix clock hands rotating in the wrong direction

This commit is contained in:
end-4
2025-10-30 16:04:55 +01:00
parent d645286744
commit 0551c010b5
4 changed files with 18 additions and 5 deletions
@@ -19,6 +19,14 @@ Item {
} }
rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60)
Behavior on rotation {
animation: RotationAnimation {
direction: RotationAnimation.Clockwise
duration: 300
easing.type: Easing.BezierSpline
easing.bezierCurve: Appearance.animationCurves.emphasized
}
}
Rectangle { Rectangle {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@@ -14,9 +14,13 @@ Item {
property color color: Appearance.colors.colSecondary property color color: Appearance.colors.colSecondary
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: RotationAnimation {
direction: RotationAnimation.Clockwise
duration: 300
easing.type: Easing.BezierSpline
easing.bezierCurve: Appearance.animationCurves.emphasized
}
} }
Rectangle { Rectangle {
@@ -19,7 +19,8 @@ Item {
Behavior on rotation { Behavior on rotation {
enabled: Config.options.background.clock.cookie.constantlyRotate // Animating every second is expensive... enabled: Config.options.background.clock.cookie.constantlyRotate // Animating every second is expensive...
animation: NumberAnimation { animation: RotationAnimation {
direction: RotationAnimation.Clockwise
duration: 1000 // 1 second duration: 1000 // 1 second
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
@@ -1,9 +1,9 @@
pragma Singleton
pragma ComponentBehavior: Bound
import qs.modules.common import qs.modules.common
import QtQuick import QtQuick
import Quickshell import Quickshell
import Quickshell.Services.Pipewire import Quickshell.Services.Pipewire
pragma Singleton
pragma ComponentBehavior: Bound
/** /**
* A nice wrapper for default Pipewire audio sink and source. * A nice wrapper for default Pipewire audio sink and source.