C5: render notification image/appIcon in popups and center

This commit is contained in:
Damocles 2026-04-13 16:59:17 +02:00
parent bc3236fce6
commit 3a9cd59243
2 changed files with 34 additions and 4 deletions

View file

@ -225,12 +225,27 @@ M.PopupPanel {
} }
} }
Image {
id: ncIcon
anchors.left: parent.left
anchors.leftMargin: 14
anchors.top: parent.top
anchors.topMargin: 6
width: 24
height: 24
source: notifItem.modelData.image || notifItem.modelData.appIcon || ""
visible: status === Image.Ready
fillMode: Image.PreserveAspectFit
sourceSize: Qt.size(24, 24)
asynchronous: true
}
Column { Column {
id: notifContent id: notifContent
anchors.left: parent.left anchors.left: ncIcon.visible ? ncIcon.right : parent.left
anchors.right: dismissBtn.left anchors.right: dismissBtn.left
anchors.top: parent.top anchors.top: parent.top
anchors.leftMargin: 14 anchors.leftMargin: ncIcon.visible ? 6 : 14
anchors.topMargin: 6 anchors.topMargin: 6
spacing: 1 spacing: 1

View file

@ -136,13 +136,28 @@ PanelWindow {
shadowHorizontalOffset: 0 shadowHorizontalOffset: 0
} }
Image {
id: notifIcon
anchors.left: parent.left
anchors.leftMargin: 14
anchors.top: parent.top
anchors.topMargin: 8
width: 36
height: 36
source: popupItem.modelData.image || popupItem.modelData.appIcon || ""
visible: status === Image.Ready
fillMode: Image.PreserveAspectFit
sourceSize: Qt.size(36, 36)
asynchronous: true
}
Column { Column {
id: contentCol id: contentCol
anchors.left: parent.left anchors.left: notifIcon.visible ? notifIcon.right : parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
anchors.margins: 8 anchors.margins: 8
anchors.leftMargin: 14 anchors.leftMargin: notifIcon.visible ? 8 : 14
spacing: 2 spacing: 2
// App name + time // App name + time