change rect date animation and background color

This commit is contained in:
darksignal7
2025-10-06 18:32:02 +03:00
parent 1ec94aa2a6
commit 594dc64824
@@ -11,7 +11,8 @@ Item {
id: root
property string style: "rotating"
property color colOnBackground: Appearance.colors.colOnSecondaryContainer
property color colOnSecondary: Appearance.colors.colOnSecondaryContainer
Canvas {
z: 0
width: parent.width
@@ -55,12 +56,12 @@ Item {
}
}
// Date (only today's number) in right side of the clock
// Square date (only today's number) in right side of the clock
Rectangle {
z: 1
implicitWidth: 45
implicitWidth: root.style === "rect" ? 45 : 0
implicitHeight: root.style === "rect" ? 30 : 0
color: root.colOnBackground
color: root.colOnSecondary
radius: Appearance.rounding.small
anchors {
verticalCenter: parent.verticalCenter
@@ -70,6 +71,9 @@ Item {
Behavior on implicitHeight {
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
}
Behavior on implicitWidth {
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
}
StyledText {
opacity: root.style === "rect" ? 1.0 : 0
Behavior on opacity {