Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions panels/notification/bubble/bubbleitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};

Expand All @@ -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();
}

Expand Down Expand Up @@ -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());
}

Expand Down
3 changes: 2 additions & 1 deletion panels/notification/plugin/NotifyItemContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ NotifyItem {
}
}

background: NotifyItemBackground {
background: Rectangle {
color: Qt.rgba(0, 0, 0, 0.3)
}
}