mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 09:48:50 +00:00
notifications count in the compact representation
This commit is contained in:
parent
48c8071bdb
commit
89f1f1a8af
1 changed files with 26 additions and 1 deletions
|
|
@ -129,10 +129,35 @@ Item {
|
||||||
text: i18n("No recent notifications")
|
text: i18n("No recent notifications")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Plasmoid.compactRepresentation: PlasmaCore.SvgItem {
|
||||||
|
id: notificationSvgItem
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: units.roundToIconSize(Math.min(parent.width, parent.height))
|
||||||
|
height: width
|
||||||
|
|
||||||
|
svg: PlasmaCore.Svg {
|
||||||
|
imagePath: "icons/notification"
|
||||||
|
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||||
|
}
|
||||||
|
|
||||||
|
elementId: {
|
||||||
|
if (notificationsModel.count > 0) {
|
||||||
|
return "notification-empty"
|
||||||
|
}
|
||||||
|
return "notification-disabled"
|
||||||
|
}
|
||||||
|
PlasmaComponents.Label {
|
||||||
|
anchors.fill: parent
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
visible: notificationsModel.count > 0
|
||||||
|
text: notificationsModel.count
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
id: notificationsModel
|
id: notificationsModel
|
||||||
/* ListElement {
|
/* ListElement {
|
||||||
source: "call1Source"
|
source: "call1Source"
|
||||||
appIcon: "call-start"
|
appIcon: "call-start"
|
||||||
summary: "Missed call from Joe"
|
summary: "Missed call from Joe"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue