mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +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")
|
||||
}
|
||||
|
||||
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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue