forked from Shinonome/dots-hyprland
change 'rotating' dateStyle radius, fix bubble dateStyle
This commit is contained in:
+7
-2
@@ -8,19 +8,24 @@ import QtQuick
|
||||
|
||||
Canvas {
|
||||
z: 0
|
||||
|
||||
opacity: root.style === "rotating" ? 1.0 : 0
|
||||
Behavior on opacity {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
rotation: {
|
||||
if (!Config.options.time.secondPrecision)
|
||||
return 0;
|
||||
return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center
|
||||
}
|
||||
|
||||
onPaint: {
|
||||
var ctx = getContext("2d");
|
||||
ctx.clearRect(0, 0, width, height);
|
||||
ctx.font = "700 30px " + Appearance.font.family.title;
|
||||
|
||||
var text = Qt.locale().toString(DateTime.clock.date, "ddd dd");
|
||||
var radius = 78;
|
||||
var radius = 65;
|
||||
var angleStep = Math.PI / 2.35 / text.length;
|
||||
|
||||
for (var i = 0; i < text.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user