forked from Shinonome/dots-hyprland
cookie clock: fix bubble date's bubbles being the same
This commit is contained in:
@@ -6,11 +6,12 @@ import qs.modules.common.widgets
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
id: root
|
||||||
property bool isMonth: false
|
property bool isMonth: false
|
||||||
property real targetSize: 0
|
property real targetSize: 0
|
||||||
property alias text: bubbleText.text
|
property alias text: bubbleText.text
|
||||||
|
|
||||||
text: Qt.locale().toString(DateTime.clock.date, isMonth ? "MM" : "d")
|
text: Qt.locale().toString(DateTime.clock.date, root.isMonth ? "MM" : "d")
|
||||||
|
|
||||||
MaterialCookie {
|
MaterialCookie {
|
||||||
z: 5
|
z: 5
|
||||||
@@ -26,14 +27,10 @@ Item {
|
|||||||
z: 6
|
z: 6
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: root.isMonth ? Appearance.colors.colPrimary : Appearance.colors.colTertiary
|
color: root.isMonth ? Appearance.colors.colPrimary : Appearance.colors.colTertiary
|
||||||
opacity: root.style === "bubble" ? 1 : 0
|
|
||||||
font {
|
font {
|
||||||
family: Appearance.font.family.expressive
|
family: Appearance.font.family.expressive
|
||||||
pixelSize: 30
|
pixelSize: 30
|
||||||
weight: Font.Black
|
weight: Font.Black
|
||||||
}
|
}
|
||||||
Behavior on opacity {
|
|
||||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user