diff --git a/src/gui/tray/ActivityItemContent.qml b/src/gui/tray/ActivityItemContent.qml index 98ea3c2277f04..92d4ed5838b6f 100644 --- a/src/gui/tray/ActivityItemContent.qml +++ b/src/gui/tray/ActivityItemContent.qml @@ -104,7 +104,7 @@ RowLayout { cache: true fillMode: Image.PreserveAspectFit - source: Style.darkMode ? model.darkIcon : model.lightIcon + source: model.icon + "/" + palette.text sourceSize.height: 64 sourceSize.width: 64 mipmap: true // Addresses grainy downscale diff --git a/src/gui/tray/activitylistmodel.cpp b/src/gui/tray/activitylistmodel.cpp index a2d80c2c04d8e..65de2e91d7533 100644 --- a/src/gui/tray/activitylistmodel.cpp +++ b/src/gui/tray/activitylistmodel.cpp @@ -65,8 +65,7 @@ QHash ActivityListModel::roleNames() const roles[LinkRole] = "link"; roles[MessageRole] = "message"; roles[ActionRole] = "type"; - roles[DarkIconRole] = "darkIcon"; - roles[LightIconRole] = "lightIcon"; + roles[IconRole] = "icon"; roles[ActionTextRole] = "subject"; roles[ActionsLinksRole] = "links"; roles[ActionsLinksContextMenuRole] = "linksContextMenu"; @@ -288,10 +287,8 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const return ActivityListModel::convertLinksToActionButtons(a); } - case DarkIconRole: - case LightIconRole: { + case IconRole: return generateIconPath(); - } case ObjectTypeRole: return a._objectType; case ObjectIdRole: diff --git a/src/gui/tray/activitylistmodel.h b/src/gui/tray/activitylistmodel.h index 6251a12e9a1ff..e8e4ed5bb93e0 100644 --- a/src/gui/tray/activitylistmodel.h +++ b/src/gui/tray/activitylistmodel.h @@ -51,8 +51,7 @@ class ActivityListModel : public QAbstractListModel public: enum DataRole { - DarkIconRole = Qt::UserRole + 1, - LightIconRole, + IconRole = Qt::UserRole + 1, AccountRole, ObjectTypeRole, ObjectIdRole, diff --git a/test/testactivitylistmodel.cpp b/test/testactivitylistmodel.cpp index 7b440dffa3201..84277356bcf12 100644 --- a/test/testactivitylistmodel.cpp +++ b/test/testactivitylistmodel.cpp @@ -225,8 +225,7 @@ private slots: QVERIFY(!index.data(OCC::ActivityListModel::AccountRole).toString().isEmpty()); QVERIFY(!index.data(OCC::ActivityListModel::ActionTextColorRole).toString().isEmpty()); - QVERIFY(!index.data(OCC::ActivityListModel::DarkIconRole).toString().isEmpty()); - QVERIFY(!index.data(OCC::ActivityListModel::LightIconRole).toString().isEmpty()); + QVERIFY(!index.data(OCC::ActivityListModel::IconRole).toString().isEmpty()); QVERIFY(!index.data(OCC::ActivityListModel::PointInTimeRole).toString().isEmpty()); QVERIFY(index.data(OCC::ActivityListModel::ObjectTypeRole).canConvert());