From 154c53f48138ebcf31190c4cc69679ea0735f0a2 Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Tue, 29 Mar 2022 11:57:54 +0800 Subject: [PATCH] applets/clipboard: Give PlaceholderMessage an icon Use "edit-paste" when there is no history item, or "edit-none" when the filter returns nothing. --- applets/clipboard/contents/ui/Menu.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applets/clipboard/contents/ui/Menu.qml b/applets/clipboard/contents/ui/Menu.qml index aeb2da94f..d6baeb53d 100644 --- a/applets/clipboard/contents/ui/Menu.qml +++ b/applets/clipboard/contents/ui/Menu.qml @@ -71,11 +71,14 @@ PlasmaComponents3.ScrollView { PlasmaExtras.PlaceholderMessage { id: emptyHint + readonly property bool hasText: model.filterRegExp.length > 0 + anchors.centerIn: parent width: parent.width - (PlasmaCore.Units.largeSpacing * 4) visible: menuListView.count === 0 - text: model.filterRegExp.length > 0 ? i18n("No matches") : i18n("Clipboard is empty") + iconName: hasText ? "edit-none" : "edit-paste" + text: hasText ? i18n("No matches") : i18n("Clipboard is empty") } } }