From e60a1694dfc2a110488d9ec4da6c08458e9b16cb Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Thu, 25 Feb 2021 12:13:15 -0700 Subject: [PATCH] [applets/devicenotifier] Add placeholder icon when no device icon exists Otherwise the list item loses its icon for a moment when its device is removed, and this looks a bit odd. BUG: 433534 FIXED-IN: 5.21.2 --- applets/devicenotifier/package/contents/ui/DeviceItem.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/applets/devicenotifier/package/contents/ui/DeviceItem.qml b/applets/devicenotifier/package/contents/ui/DeviceItem.qml index b4b04a6c4..aa8a8b55c 100644 --- a/applets/devicenotifier/package/contents/ui/DeviceItem.qml +++ b/applets/devicenotifier/package/contents/ui/DeviceItem.qml @@ -136,7 +136,9 @@ PlasmaExtras.ExpandableListItem { } - icon: sdSource.data[udi] == undefined ? "" : sdSource.data[udi].Icon + // When there's no better icon available, show a placeholder icon instead + // of nothing + icon: sdSource.data[udi] == undefined ? "device-notifier" : sdSource.data[udi].Icon iconEmblem: { if (sdSource.data[udi] != undefined) {