diff --git a/modules/notifications/NotificationCard.qml b/modules/notifications/NotificationCard.qml index e16dcd3..47544cc 100644 --- a/modules/notifications/NotificationCard.qml +++ b/modules/notifications/NotificationCard.qml @@ -21,64 +21,69 @@ Rectangle { running: true onTriggered: notifyItem.modelData.expire() } - RowLayout { id: fullLayout anchors.margins: 20 anchors.fill: parent - anchors.centerIn: parent spacing: 10 - ClippingWrapperRectangle { - id: notiIconWrapper - Layout.alignment: Qt.AlignTop - radius: notifyItem.radius - notifyItem.radius / 3 - implicitWidth: notiIcon.implicitSize - color: "transparent" - implicitHeight: notiIcon.implicitSize - visible: notifyItem.modelData.image !== "" - IconImage { - id: notiIcon - source: notifyItem.modelData.image !== "" ? notifyItem.modelData.image : Quickshell.iconPath("preferences-desktop-notification-bell") - implicitSize: 64 - asynchronous: true - } - } - ColumnLayout { id: textLayout Layout.fillWidth: true Layout.alignment: Qt.AlignTop spacing: 0 - CText { - id: appName - text: notifyItem.modelData.appName - opacity: 0.5 - font.pixelSize: 10 - } - CText { - id: summary - text: notifyItem.modelData.summary - font.bold: true - elide: Text.ElideRight - Layout.fillWidth: true - Layout.bottomMargin: 0 - Layout.topMargin: 5 - maximumLineCount: 1 - onTextChanged: { - dismissTimer.restart(); + // 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 + 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 + } } } } diff --git a/settings/settings.json b/settings/settings.json index b0fe008..d28f17c 100644 --- a/settings/settings.json +++ b/settings/settings.json @@ -2,7 +2,7 @@ "barHeight": 32, "barSpacing": 10, "barmargins": 6, - "currentWall": "/home/lucy/.walls/mooon.png", + "currentWall": "/home/lucy/.walls/frierensuff.png", "floating": true, "font": "Google Sans", "fontSize": 13,