summaryrefslogtreecommitdiff
path: root/modules/sidebar/Notif.qml
diff options
context:
space:
mode:
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
}