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.
This commit is contained in:
Sven Fischer 2025-12-20 22:20:23 +01:00 committed by GitHub
parent d819bf2fc3
commit 8d63cd41b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 1 deletions

View file

@ -547,6 +547,7 @@ default, you must create it manually.
"clearThreshold": 0.3,
"defaultExpireTimeout": 5000,
"expandThreshold": 20,
"openExpanded": false,
"expire": false
},
"osd": {

View file

@ -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 {

View file

@ -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