diff --git a/modules/notification/NotificationBody.qml b/modules/notification/NotificationBody.qml index 78dd8ab..9491515 100644 --- a/modules/notification/NotificationBody.qml +++ b/modules/notification/NotificationBody.qml @@ -131,12 +131,16 @@ Rectangle { height: iconImage.width anchors.horizontalCenter: parent.horizontalCenter - source: ( - notification.appIcon ? Quickshell.iconPath(notification.appIcon) : - notification.image ? notification.image : - Quickshell.iconPath(DesktopEntries.byId(notification.desktopEntry).icon) ? Quickshell.iconPath(DesktopEntries.byId(notification.desktopEntry).icon) : - Quickshell.iconPath("notifications") - ) + source: { + if (notification.appIcon) return Quickshell.iconPath(notification.appIcon) + if (notification.image) return notification.image + const entry = notification.desktopEntry ? DesktopEntries.byId(notification.desktopEntry) : null + if (entry && entry.icon) { + const p = Quickshell.iconPath(entry.icon) + if (p && p !== "") return p + } + return Quickshell.iconPath("notifications") + } fillMode: Image.PreserveAspectFit asynchronous: true