From ef5936d0ab58b79d55d79da0c77627f09676691d Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 18 Sep 2025 23:39:23 +1000 Subject: notifs: persistent notifs + better sidebar notifs --- modules/sidebar/Notif.qml | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) (limited to 'modules/sidebar/Notif.qml') 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 } -- cgit v1.2.3-freya