69 lines
1.3 KiB
QML
69 lines
1.3 KiB
QML
import QtQuick
|
|
import Quickshell
|
|
import "../../config"
|
|
|
|
Rectangle {
|
|
id: root
|
|
|
|
required property var notification
|
|
|
|
|
|
Component.onCompleted: {
|
|
console.log(
|
|
"[NotificationBody]:",
|
|
notification,
|
|
"notification:",
|
|
notification.appName
|
|
)
|
|
}
|
|
|
|
implicitWidth: parent ? parent.width : 300
|
|
implicitHeight: content.implicitHeight + 20
|
|
|
|
color: "transparent"
|
|
|
|
border.width: Config.border_width
|
|
border.color: Colors.primary
|
|
|
|
Column {
|
|
id: content
|
|
|
|
anchors.fill: parent
|
|
anchors.margins: 10
|
|
|
|
spacing: 5
|
|
|
|
Text {
|
|
width: parent.width
|
|
|
|
text: root.notification?.appName ?? ""
|
|
font.family: Config.font
|
|
font.pixelSize: 18
|
|
color: Colors.primary
|
|
|
|
elide: Text.ElideRight
|
|
}
|
|
|
|
Text {
|
|
width: parent.width
|
|
|
|
text: root.notification?.summary ?? ""
|
|
font.family: Config.font
|
|
font.pixelSize: 22
|
|
color: Colors.primary
|
|
|
|
wrapMode: Text.Wrap
|
|
}
|
|
|
|
Text {
|
|
width: parent.width
|
|
|
|
text: root.notification?.body ?? ""
|
|
font.family: Config.font
|
|
font.pixelSize: 16
|
|
color: Colors.primary
|
|
|
|
wrapMode: Text.Wrap
|
|
}
|
|
}
|
|
} |