From 339ba914bf3f61d248b75af7ff6b965cfe8b3992 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Mon, 24 Jul 2023 21:14:52 +0800 Subject: Add placeholder when lists are empty --- contents/ui/main.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'contents') diff --git a/contents/ui/main.qml b/contents/ui/main.qml index b49996d..006e81b 100644 --- a/contents/ui/main.qml +++ b/contents/ui/main.qml @@ -231,6 +231,14 @@ Item { spacing: PlasmaCore.Units.smallSpacing delegate: ActivityView {} model: announcementsModel + + PlasmaExtras.PlaceholderMessage { + anchors.centerIn: parent + width: parent.width - (PlasmaCore.Units.largeSpacing * 4) + visible: announcementsModel.count == 0 + iconName: "mail-read-symbolic" + text: "No announcements" + } } } @@ -269,6 +277,14 @@ Item { spacing: PlasmaCore.Units.gridUnit delegate: ActivityView {} model: assignmentsModel + + PlasmaExtras.PlaceholderMessage { + anchors.centerIn: parent + width: parent.width - (PlasmaCore.Units.largeSpacing * 4) + visible: assignmentsModel.count == 0 + iconName: "mail-read-symbolic" + text: "No assignments" + } } } -- cgit v1.2.3