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