diff --git a/modules/notification/NotificationBody.qml b/modules/notification/NotificationBody.qml index 9491515..378b8dc 100644 --- a/modules/notification/NotificationBody.qml +++ b/modules/notification/NotificationBody.qml @@ -62,7 +62,7 @@ Rectangle { id: contentColumn anchors.fill: parent spacing: 0 - // spacing: Config.spacing + Rectangle{ id: contentRowRectangle height: Math.max(iconRectangle.height, contentRectangle.height)+contentRow.anchors.margins*2 @@ -108,8 +108,8 @@ Rectangle { Row { id: contentRow anchors.fill: parent - anchors.margins: 10 - spacing: Config.spacing*4 + anchors.margins: Config.spacing + spacing: Config.spacing width: parent.width // Left side: icon + icon information @@ -132,8 +132,8 @@ Rectangle { anchors.horizontalCenter: parent.horizontalCenter source: { - if (notification.appIcon) return Quickshell.iconPath(notification.appIcon) if (notification.image) return notification.image + if (notification.appIcon) return Quickshell.iconPath(notification.appIcon) const entry = notification.desktopEntry ? DesktopEntries.byId(notification.desktopEntry) : null if (entry && entry.icon) { const p = Quickshell.iconPath(entry.icon) @@ -166,15 +166,28 @@ Rectangle { // Right side: notification information Rectangle{ id: contentRectangle - width: childrenRect.width - height: childrenRect.height + width: root.width - iconColumn.width - contentRow.spacing - contentRow.anchors.margins*2 + height: iconRectangle.height color: "transparent" Column { id: contentBodyColumn - width: root.width - iconColumn.width + width: parent.width + height: Math.max(childrenRect.height, iconRectangle.height) spacing: Config.spacing + Text { + id: bodyTitleText + text: { + if (notification.image) return notification.appName.charAt(0).toUpperCase() + notification.appName.slice(1) + return "Message:" + } + font.family: Config.font + font.bold: true + font.pixelSize: closingMouseArea.height //Config.screen_height_to_font_small(screen.height) + color: textColor + } + Text { id: bodyText text: root.notification.body