notifications count in the compact representation

This commit is contained in:
Marco Martin 2017-09-04 14:16:51 +02:00
parent 48c8071bdb
commit 89f1f1a8af

View file

@ -129,10 +129,35 @@ Item {
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 {
id: notificationsModel
/* ListElement {
/* ListElement {
source: "call1Source"
appIcon: "call-start"
summary: "Missed call from Joe"