forked from Shinonome/dots-hyprland
fix animations
This commit is contained in:
@@ -71,7 +71,7 @@ Rectangle {
|
||||
text: "bolt"
|
||||
font.pixelSize: Appearance.font.pixelSize.large
|
||||
color: Appearance.m3colors.m3onSecondaryContainer
|
||||
visible: opacity !== 0 // Only show when charging
|
||||
visible: opacity > 0 // Only show when charging
|
||||
opacity: isCharging ? 1 : 0 // Keep opacity for visibility
|
||||
|
||||
Behavior on opacity {
|
||||
|
||||
@@ -81,14 +81,19 @@ Item {
|
||||
Item {
|
||||
id: notificationBackgroundWrapper
|
||||
|
||||
anchors.fill: parent
|
||||
implicitHeight: notificationColumnLayout.implicitHeight
|
||||
// anchors.fill: parent
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.topMargin: notificationListSpacing
|
||||
implicitHeight: notificationColumnLayout.implicitHeight + notificationListSpacing
|
||||
|
||||
Rectangle {
|
||||
id: notificationBackground
|
||||
anchors.fill: parent
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: notificationColumnLayout.implicitHeight
|
||||
|
||||
color: (notificationObject.urgency == NotificationUrgency.Critical) ?
|
||||
Appearance.mix(Appearance.m3colors.m3secondaryContainer, Appearance.colors.colLayer2, 0.35) : Appearance.colors.colLayer2
|
||||
@@ -109,7 +114,7 @@ Item {
|
||||
id: notificationRowWrapper
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
implicitHeight: notificationColumnLayout.implicitHeight + notificationListSpacing
|
||||
|
||||
Behavior on x {
|
||||
|
||||
@@ -65,7 +65,7 @@ Rectangle {
|
||||
// The thing when collapsed
|
||||
RowLayout {
|
||||
id: collapsedBottomWidgetGroupRow
|
||||
visible: opacity != 0
|
||||
visible: opacity > 0
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: Appearance.animation.elementDecel.duration / 2
|
||||
@@ -104,7 +104,7 @@ Rectangle {
|
||||
RowLayout {
|
||||
id: bottomWidgetGroupRow
|
||||
|
||||
visible: opacity != 0
|
||||
visible: opacity > 0
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: Appearance.animation.elementDecel.duration / 2
|
||||
|
||||
@@ -81,7 +81,16 @@ Item {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: `${notificationWidgetList.length} Notifications`
|
||||
text: `${notificationWidgetList.length} notification${notificationWidgetList.length > 1 ? "s" : ""}`
|
||||
|
||||
opacity: notificationWidgetList.length > 0 ? 1 : 0
|
||||
visible: opacity > 0
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: Appearance.animation.elementDecel.duration
|
||||
easing.type: Appearance.animation.elementDecel.type
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user