mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-06 07:19:27 -05:00
'rect' date respects 'numbers' dial style position
This commit is contained in:
+9
-14
@@ -9,6 +9,7 @@ import QtQuick
|
||||
|
||||
Item {
|
||||
id: root
|
||||
readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle
|
||||
property string style: "rotating"
|
||||
property color colOnBackground: Appearance.colors.colOnSecondaryContainer
|
||||
property color colBackground: Appearance.colors.colOnSecondaryContainer
|
||||
@@ -23,28 +24,22 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
// Square date (only today's number) in right side of the clock
|
||||
// Rectangle date (only today's number) in right side of the clock
|
||||
Loader {
|
||||
width: root.style === "rect" ? 45 : 0
|
||||
height: root.style === "rect" ? 30 : 0
|
||||
|
||||
Behavior on height {
|
||||
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
|
||||
}
|
||||
Behavior on width {
|
||||
id: rectLoader
|
||||
z: 0
|
||||
|
||||
property real animIndex: root.style === "rect" ? 1.0 : 0.0
|
||||
Behavior on animIndex {
|
||||
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
active: height > 0
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
rightMargin: 10
|
||||
}
|
||||
active: animIndex > 0
|
||||
|
||||
sourceComponent: RectangleDate {
|
||||
color: root.colBackground
|
||||
radius: Appearance.rounding.small
|
||||
animIndex: rectLoader.animIndex
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,25 @@ import QtQuick
|
||||
|
||||
Rectangle {
|
||||
z: 1
|
||||
|
||||
readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle
|
||||
|
||||
property real animIndex: 0
|
||||
opacity: animIndex
|
||||
|
||||
width: 45
|
||||
height: 30
|
||||
|
||||
x: dialStyle === "numbers" ? 155 : 175
|
||||
y: dialStyle === "numbers" ? 155 : 100
|
||||
|
||||
Behavior on x {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
Behavior on y {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
StyledText {
|
||||
opacity: root.style === "rect" ? 1.0 : 0
|
||||
Behavior on opacity {
|
||||
|
||||
Reference in New Issue
Block a user