diff --git a/panels/notification/bubble/bubbleitem.cpp b/panels/notification/bubble/bubbleitem.cpp index 08b8f1b0a..26c13ff9e 100644 --- a/panels/notification/bubble/bubbleitem.cpp +++ b/panels/notification/bubble/bubbleitem.cpp @@ -121,8 +121,6 @@ static QString imagePathOfNotification(const QVariantMap &hints, const QString & static const QStringList HintsOrder { "desktop-entry", "image-data", - "image-path", - "image_path", "icon_data" }; @@ -147,10 +145,9 @@ static QString imagePathOfNotification(const QVariantMap &hints, const QString & img.save(file.fileName()); return file.fileName(); } - QIcon icon = decodeIconFromPath(imageData, appName); - if (icon.isNull()) { - qCWarning(notifyLog) << "Can't get icon for notification, appName:" << appName; - } + + DGUI_USE_NAMESPACE; + auto icon = DIconTheme::findQIcon(appName, DIconTheme::findQIcon("application-x-desktop")); return icon.name(); } @@ -197,6 +194,10 @@ QString BubbleItem::appName() const QString BubbleItem::appIcon() const { + if (!m_entity.appIcon().isEmpty()) { + return m_entity.appIcon(); + } + return imagePathOfNotification(m_entity.hints(), m_entity.appIcon(), m_entity.appName()); } diff --git a/panels/notification/plugin/NotifyItemContent.qml b/panels/notification/plugin/NotifyItemContent.qml index cd8f48b12..9c36032fa 100644 --- a/panels/notification/plugin/NotifyItemContent.qml +++ b/panels/notification/plugin/NotifyItemContent.qml @@ -242,6 +242,7 @@ NotifyItem { } } - background: NotifyItemBackground { + background: Rectangle { + color: Qt.rgba(0, 0, 0, 0.3) } }