mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
bg clock: fix cursed bubble date
This commit is contained in:
@@ -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)
|
||||
|
||||
+2
-2
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user