import QtQuick import qs.settings import QtQuick.Layouts import qs import Quickshell import qs.widgets import Quickshell.Widgets Rectangle { id: notifyItem required property var modelData implicitWidth: ListView.view ? ListView.view.width : 500 implicitHeight: fullLayout.implicitHeight + 40 color: dismissArea.containsMouse ? Colors.base02 : Colors.base00 radius: Settings.config.rounding border.width: 2 border.color: Colors.base0D Timer { id: dismissTimer interval: 5000 running: true onTriggered: notifyItem.modelData.expire() } RowLayout { id: fullLayout anchors.margins: 20 anchors.fill: parent spacing: 10 ColumnLayout { id: textLayout Layout.fillWidth: true Layout.alignment: Qt.AlignTop spacing: 0 // New RowLayout to hold the Icon and App Name together RowLayout { id: iconTextLayout spacing: 8 ClippingWrapperRectangle { id: notiIconWrapper radius: notifyItem.radius - notifyItem.radius / 3 implicitWidth: notiIcon.implicitSize implicitHeight: notiIcon.implicitSize color: "transparent" child: IconImage { id: notiIcon // Keep your existing source logic source: notifyItem.modelData.image !== "" ? notifyItem.modelData.image : Quickshell.iconPath("/usr/share/icons/Papirus/24x24/panel/notifications.svg") implicitSize: 22 // Slightly smaller to match text height asynchronous: true } } CText { id: appName text: notifyItem.modelData.appName opacity: 0.5 font.pixelSize: 10 } } ColumnLayout { spacing: 0 Layout.alignment: Qt.AlignHCenter Layout.leftMargin: notiIcon.implicitWidth + iconTextLayout.spacing CText { id: summary text: notifyItem.modelData.summary font.bold: true elide: Text.ElideRight Layout.fillWidth: true Layout.topMargin: 5 } CText { text: notifyItem.modelData.body font.pixelSize: Settings.config.fontSize - 2 maximumLineCount: 1 opacity: 0.3 wrapMode: Text.WordWrap elide: Text.ElideRight Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter } } } } MouseArea { id: dismissArea anchors.fill: parent acceptedButtons: Qt.LeftButton onClicked: notifyItem.modelData.dismiss() cursorShape: Qt.PointingHandCursor hoverEnabled: true } }