summaryrefslogtreecommitdiff
path: root/modules/sidebar/Notif.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-18 23:39:23 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-18 23:39:23 +1000
commitef5936d0ab58b79d55d79da0c77627f09676691d (patch)
tree04a21d49d00d912b23a1665dc5ac1fc4492c6aee /modules/sidebar/Notif.qml
parentsidebar: add notifs (diff)
downloadcaelestia-shell-ef5936d0ab58b79d55d79da0c77627f09676691d.tar.gz
caelestia-shell-ef5936d0ab58b79d55d79da0c77627f09676691d.tar.bz2
caelestia-shell-ef5936d0ab58b79d55d79da0c77627f09676691d.zip
notifs: persistent notifs + better sidebar notifs
Diffstat (limited to 'modules/sidebar/Notif.qml')
-rw-r--r--modules/sidebar/Notif.qml38
1 files changed, 5 insertions, 33 deletions
diff --git a/modules/sidebar/Notif.qml b/modules/sidebar/Notif.qml
index 8b96792..3aecc59 100644
--- a/modules/sidebar/Notif.qml
+++ b/modules/sidebar/Notif.qml
@@ -1,10 +1,8 @@
pragma ComponentBehavior: Bound
import qs.components
-import qs.components.controls
import qs.services
import qs.config
-import Quickshell
import QtQuick
import QtQuick.Layouts
@@ -15,8 +13,9 @@ StyledRect {
required property Props props
required property bool expanded
- Layout.fillWidth: true
- implicitHeight: expanded ? summary.implicitHeight + expandedContent.implicitHeight + expandedContent.anchors.topMargin + Appearance.padding.normal * 2 : summary.implicitHeight
+ readonly property real nonAnimHeight: expanded ? summary.implicitHeight + expandedContent.implicitHeight + expandedContent.anchors.topMargin + Appearance.padding.normal * 2 : summary.implicitHeight
+
+ implicitHeight: nonAnimHeight
radius: Appearance.rounding.small
color: {
@@ -44,34 +43,6 @@ StyledRect {
}
}
- ParallelAnimation {
- running: true
-
- Anim {
- target: root
- property: "opacity"
- from: 0
- to: 1
- }
- Anim {
- target: root
- property: "scale"
- from: 0.7
- to: 1
- }
- // Anim {
- // target: root.Layout
- // property: "preferredHeight"
- // from: 0
- // to: root.implicitHeight
- // }
- }
-
- RetainableLock {
- object: root.modelData.notification
- locked: true
- }
-
StyledText {
id: summary
@@ -139,7 +110,8 @@ StyledRect {
StyledText {
Layout.fillWidth: true
- text: root.modelData.body || qsTr("No body here! :/")
+ textFormat: Text.MarkdownText
+ text: root.modelData.body.replace(/(.)\n(?!\n)/g, "$1\n\n") || qsTr("No body here! :/")
color: root.modelData.urgency === "critical" ? Colours.palette.m3secondary : Colours.palette.m3outline
wrapMode: Text.WordWrap
}