mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
rename waveAnimation to constantlyRotate, disable by default
This commit is contained in:
@@ -94,7 +94,7 @@ Item {
|
||||
amplitude: implicitSize / 70
|
||||
sides: Config.options.background.clock.clockSides
|
||||
color: root.colBackground
|
||||
waveAnimation: Config.options.background.clock.cookie.waveAnimation
|
||||
constantlyRotate: Config.options.background.clock.cookie.constantlyRotate
|
||||
}
|
||||
|
||||
// Hour dots dial style
|
||||
|
||||
@@ -139,7 +139,7 @@ Singleton {
|
||||
property bool timeIndicators: true
|
||||
property bool centerGlow: true
|
||||
property bool dateInClock: true
|
||||
property bool waveAnimation: true
|
||||
property bool constantlyRotate: false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,15 +14,14 @@ Item {
|
||||
property int renderPoints: 360
|
||||
property color color: "#605790"
|
||||
property alias strokeWidth: shapePath.strokeWidth
|
||||
property bool waveAnimation: false
|
||||
|
||||
property bool constantlyRotate: false
|
||||
|
||||
implicitWidth: implicitSize
|
||||
implicitHeight: implicitSize
|
||||
|
||||
property real waveTime: 0
|
||||
Loader{
|
||||
active: waveAnimation
|
||||
active: constantlyRotate
|
||||
sourceComponent: Timer{
|
||||
interval: 16 // Does it effect performance, probably, is it noticeable, not really
|
||||
running: true; repeat: true
|
||||
@@ -60,7 +59,7 @@ Item {
|
||||
var radius = root.implicitSize / 2 - root.amplitude
|
||||
for (var i = 0; i <= steps; i++) {
|
||||
var angle = (i / steps) * 2 * Math.PI
|
||||
var wave = waveAnimation ? Math.sin(angle * root.animatedSides + Math.PI/2 - root.waveTime) * root.amplitude : Math.sin(angle * root.animatedSides + Math.PI/2) * root.amplitude
|
||||
var wave = constantlyRotate ? Math.sin(angle * root.animatedSides + Math.PI/2 - root.waveTime) * root.amplitude : Math.sin(angle * root.animatedSides + Math.PI/2) * root.amplitude
|
||||
var x = Math.cos(angle) * (radius + wave) + cx
|
||||
var y = Math.sin(angle) * (radius + wave) + cy
|
||||
points.push(Qt.point(x, y))
|
||||
|
||||
@@ -296,13 +296,13 @@ ContentPage {
|
||||
enabled: Config.options.background.clock.style === "cookie"
|
||||
visible: Config.options.background.clock.style === "cookie"
|
||||
buttonIcon: "waves"
|
||||
text: Translation.tr("Wave animation")
|
||||
checked: Config.options.background.clock.cookie.waveAnimation
|
||||
text: Translation.tr("Constantly rotate")
|
||||
checked: Config.options.background.clock.cookie.constantlyRotate
|
||||
onCheckedChanged: {
|
||||
Config.options.background.clock.cookie.waveAnimation = checked;
|
||||
Config.options.background.clock.cookie.constantlyRotate = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
text: "It may effect performance"
|
||||
text: "Makes the clock always rotate. This is extremely expensive (expect 50% usage on Intel UHD Graphics) and thus impractical."
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user