summaryrefslogtreecommitdiff
path: root/modules/lock/NotifDock.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-11 23:33:58 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-11 23:33:58 +1000
commit2c793ed8f0470b30d16e9431d07038cf8268fc95 (patch)
tree5814dd923712732ccecb89d81b08c39ceb1fac1b /modules/lock/NotifDock.qml
parentlock: add notifs (diff)
downloadcaelestia-shell-2c793ed8f0470b30d16e9431d07038cf8268fc95.tar.gz
caelestia-shell-2c793ed8f0470b30d16e9431d07038cf8268fc95.tar.bz2
caelestia-shell-2c793ed8f0470b30d16e9431d07038cf8268fc95.zip
lock/notifs: add empty placeholder
Diffstat (limited to 'modules/lock/NotifDock.qml')
-rw-r--r--modules/lock/NotifDock.qml50
1 files changed, 49 insertions, 1 deletions
diff --git a/modules/lock/NotifDock.qml b/modules/lock/NotifDock.qml
index c2ba2a7..8594d8a 100644
--- a/modules/lock/NotifDock.qml
+++ b/modules/lock/NotifDock.qml
@@ -1,5 +1,8 @@
+pragma ComponentBehavior: Bound
+
import qs.components
import qs.components.containers
+import qs.components.effects
import qs.services
import qs.config
import Quickshell
@@ -10,6 +13,8 @@ import QtQuick.Layouts
ColumnLayout {
id: root
+ required property var lock
+
anchors.fill: parent
anchors.margins: Appearance.padding.large
@@ -17,18 +22,61 @@ ColumnLayout {
StyledText {
Layout.fillWidth: true
- text: qsTr("%1 notification%2").arg(Notifs.list.length || "No").arg(Notifs.list.length === 1 ? "" : "s")
+ text: Notifs.list.length > 0 ? qsTr("%1 notification%2").arg(Notifs.list.length).arg(Notifs.list.length === 1 ? "" : "s") : qsTr("Notifications")
color: Colours.palette.m3outline
+ font.family: Appearance.font.family.mono
+ font.weight: 500
elide: Text.ElideRight
}
ClippingRectangle {
+ id: clipRect
+
Layout.fillWidth: true
Layout.fillHeight: true
radius: Appearance.rounding.small
color: "transparent"
+ Loader {
+ anchors.centerIn: parent
+ asynchronous: true
+ active: opacity > 0
+ opacity: root.lock.animating || Notifs.list.length > 0 ? 0 : 1
+
+ sourceComponent: ColumnLayout {
+ spacing: Appearance.spacing.large
+
+ Image {
+ asynchronous: true
+ source: `file://${Quickshell.shellDir}/assets/dino.png`
+ fillMode: Image.PreserveAspectFit
+ sourceSize.width: root.lock.animating ? 0 : clipRect.width * 0.8
+
+ layer.enabled: true
+ layer.effect: Colouriser {
+ colorizationColor: Colours.palette.m3outlineVariant
+ brightness: 1
+ }
+ }
+
+ StyledText {
+ Layout.alignment: Qt.AlignHCenter
+ text: qsTr("No Notifications")
+ color: Colours.palette.m3outlineVariant
+ font.pointSize: Appearance.font.size.large
+ font.family: Appearance.font.family.mono
+ font.weight: 500
+ }
+ }
+
+ Behavior on opacity {
+ Anim {
+ duration: Appearance.anim.durations.extraLarge
+ }
+ }
+ }
+
StyledListView {
anchors.fill: parent