summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Fischer <sven@leiderfischer.de>2025-12-20 22:20:23 +0100
committerGitHub <noreply@github.com>2025-12-21 08:20:23 +1100
commit8d63cd41b6d521bf64b50c9a94482b77a3e83170 (patch)
tree5fb88d1dcf5c0e792a55a77adaf76d76a24dff2b
parent[CI] chore: update flake (diff)
downloadcaelestia-shell-8d63cd41b6d521bf64b50c9a94482b77a3e83170.tar.gz
caelestia-shell-8d63cd41b6d521bf64b50c9a94482b77a3e83170.tar.bz2
caelestia-shell-8d63cd41b6d521bf64b50c9a94482b77a3e83170.zip
feat: add openExpanded notif config option (#993)
If set in the configuration, the notifications are opened in the expanded state, displaying the full notification text.
Diffstat (limited to '')
-rw-r--r--README.md1
-rw-r--r--config/NotifsConfig.qml1
-rw-r--r--modules/notifications/Notification.qml2
3 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index eb876e0..2f833e6 100644
--- a/README.md
+++ b/README.md
@@ -547,6 +547,7 @@ default, you must create it manually.
"clearThreshold": 0.3,
"defaultExpireTimeout": 5000,
"expandThreshold": 20,
+ "openExpanded": false,
"expire": false
},
"osd": {
diff --git a/config/NotifsConfig.qml b/config/NotifsConfig.qml
index 25d8680..fa2db49 100644
--- a/config/NotifsConfig.qml
+++ b/config/NotifsConfig.qml
@@ -7,6 +7,7 @@ JsonObject {
property int expandThreshold: 20
property bool actionOnClick: false
property int groupPreviewNum: 3
+ property bool openExpanded: false // Show the notifichation in expanded state when opening
property Sizes sizes: Sizes {}
component Sizes: JsonObject {
diff --git a/modules/notifications/Notification.qml b/modules/notifications/Notification.qml
index 95507fc..b5376cf 100644
--- a/modules/notifications/Notification.qml
+++ b/modules/notifications/Notification.qml
@@ -18,7 +18,7 @@ StyledRect {
readonly property bool hasImage: modelData.image.length > 0
readonly property bool hasAppIcon: modelData.appIcon.length > 0
readonly property int nonAnimHeight: summary.implicitHeight + (root.expanded ? appName.height + body.height + actions.height + actions.anchors.topMargin : bodyPreview.height) + inner.anchors.margins * 2
- property bool expanded
+ property bool expanded: Config.notifs.openExpanded
color: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3secondaryContainer : Colours.tPalette.m3surfaceContainer
radius: Appearance.rounding.normal