diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml index 3a86ccbbb..8f7f0286f 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml @@ -7,27 +7,31 @@ import qs.modules.common.widgets import QtQuick Item { - property int bubbleIndex: 0 + property bool isMonth: false property real targetSize: 0 + property alias text: bubbleText.text + + text: Qt.locale().toString(DateTime.clock.date, isMonth ? "MM" : "d") MaterialCookie { z: 5 - sides: bubbleIndex === 0 ? 4 : 1 + sides: isMonth ? 1 : 4 anchors.centerIn: parent - color: bubbleIndex === 0.0 ? Appearance.colors.colTertiaryContainer : Appearance.colors.colPrimaryContainer + color: isMonth ? Appearance.colors.colPrimaryContainer : Appearance.colors.colTertiaryContainer implicitSize: targetSize constantlyRotate: Config.options.background.clock.cookie.constantlyRotate } + StyledText { + id: bubbleText z: 6 anchors.centerIn: parent - text: bubbleIndex === 0.0 ? DateTime.date.substring(5, 7) : DateTime.date.substring(8, 10) - color: bubbleIndex === 0.0 ? Appearance.colors.colTertiary : Appearance.colors.colPrimary - opacity: root.style === "bubble" ? 1.0 : 0 + color: isMonth ? Appearance.colors.colPrimary : Appearance.colors.colTertiary + opacity: root.style === "bubble" ? 1 : 0 font { family: Appearance.font.family.expressive pixelSize: 30 - weight: 1000 + weight: Font.Black } Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml index fb286418f..3f503659c 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml @@ -53,7 +53,7 @@ Item { sourceComponent: BubbleDate { implicitWidth: dayBubbleLoader.targetSize implicitHeight: dayBubbleLoader.targetSize - bubbleIndex: 0 + isMonth: false targetSize: dayBubbleLoader.targetSize } } @@ -71,7 +71,7 @@ Item { sourceComponent: BubbleDate { implicitWidth: monthBubbleLoader.targetSize implicitHeight: monthBubbleLoader.targetSize - bubbleIndex: 1 + isMonth: true targetSize: monthBubbleLoader.targetSize } }