mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
make 'numbers' dial and 'rotating' date respect each other on position
This commit is contained in:
+3
-1
@@ -18,7 +18,9 @@ Item {
|
||||
Loader {
|
||||
anchors.fill: parent
|
||||
active: opacity > 0
|
||||
sourceComponent: RotatingDate {}
|
||||
sourceComponent: RotatingDate {
|
||||
style: root.style
|
||||
}
|
||||
}
|
||||
|
||||
// Square date (only today's number) in right side of the clock
|
||||
|
||||
+12
-1
@@ -9,7 +9,13 @@ import QtQuick
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property real radius: 65
|
||||
property string style: Config.options.background.clock.cookie.dateStyle
|
||||
readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle
|
||||
|
||||
property real radius: style === "rotating" ? dialStyle === "numbers" ? 90 : 65 : 0
|
||||
Behavior on radius {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
property string dateText: Qt.locale().toString(DateTime.clock.date, "ddd dd")
|
||||
property real angleStep: Math.PI / 2.35 / dateText.length
|
||||
@@ -17,6 +23,11 @@ Item {
|
||||
property color dayColor: Appearance.colors.colSecondary
|
||||
property color monthColor: Appearance.colors.colSecondaryHover
|
||||
|
||||
opacity: style === "rotating" ? 1.0 : 0.0
|
||||
Behavior on opacity {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
rotation: {
|
||||
if (!Config.options.time.secondPrecision) return 0
|
||||
else return secondHandLoader.item.rotation + 45 // +45 to center the text
|
||||
|
||||
Reference in New Issue
Block a user