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,6 +11,7 @@ Item {
id: root id: root
property string style: "rotating" property string style: "rotating"
property color colOnBackground: Appearance.colors.colOnSecondaryContainer property color colOnBackground: Appearance.colors.colOnSecondaryContainer
property color colOnSecondary: Appearance.colors.colOnSecondaryContainer
Canvas { Canvas {
z: 0 z: 0
@@ -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 { Rectangle {
z: 1 z: 1
implicitWidth: 45 implicitWidth: root.style === "rect" ? 45 : 0
implicitHeight: root.style === "rect" ? 30 : 0 implicitHeight: root.style === "rect" ? 30 : 0
color: root.colOnBackground color: root.colOnSecondary
radius: Appearance.rounding.small radius: Appearance.rounding.small
anchors { anchors {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
@@ -70,6 +71,9 @@ Item {
Behavior on implicitHeight { Behavior on implicitHeight {
animation: Appearance.animation.elementResize.numberAnimation.createObject(this) animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
} }
Behavior on implicitWidth {
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
}
StyledText { StyledText {
opacity: root.style === "rect" ? 1.0 : 0 opacity: root.style === "rect" ? 1.0 : 0
Behavior on opacity { Behavior on opacity {