From 2c9af9874edba336d5967024ea4d1db6d4945f2a Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Sat, 7 May 2022 16:04:16 +0800 Subject: [PATCH] plasmoid: Give PlaceholderMessage an icon "edit-none": No paired devices "network-disconnect": All paired devices are unavailable "kdeconnect": pairedDevicesModel.count < 0 --- plasmoid/package/contents/ui/FullRepresentation.qml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plasmoid/package/contents/ui/FullRepresentation.qml b/plasmoid/package/contents/ui/FullRepresentation.qml index ce0e1c95a..abab7a3f5 100644 --- a/plasmoid/package/contents/ui/FullRepresentation.qml +++ b/plasmoid/package/contents/ui/FullRepresentation.qml @@ -41,6 +41,13 @@ PlasmaExtras.Representation { anchors.centerIn: parent visible: devicesView.count === 0 + iconName: { + if (pairedDevicesModel.count >= 0) { + return pairedDevicesModel.count === 0 ? "edit-none" : "network-disconnect"; + } + return "kdeconnect"; + } + text: { if (pairedDevicesModel.count >= 0) { return pairedDevicesModel.count == 0 ? i18n("No paired devices") : i18np("Paired device is unavailable", "All paired devices are unavailable", pairedDevicesModel.count)