From 4910a40fbe4a6522db7ef20e3349beb0d950787d Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 27 Jan 2023 15:59:12 -0600 Subject: [PATCH] adding icons to the serviceListItem --- src/qml/presenter/ServiceList.qml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/qml/presenter/ServiceList.qml b/src/qml/presenter/ServiceList.qml index c0a4d80..aad91d0 100644 --- a/src/qml/presenter/ServiceList.qml +++ b/src/qml/presenter/ServiceList.qml @@ -157,7 +157,7 @@ Item { anchors.leftMargin: 5 text: name elide: Text.ElideRight - width: parent.width - trailing.width - dragHandle.width - 15 + width: parent.width - trailing.width - dragHandle.width - 25 color: { if (selected || mouseHandler.containsMouse || active) @@ -167,12 +167,21 @@ Item { } } - Controls.Label { + Kirigami.Icon { id: trailing anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter anchors.rightMargin: 5 - text: type + implicitWidth: Kirigami.Units.gridUnit + source: { + switch (type) { + case 'image': return "folder-pictures-symbolic"; + case 'video': return "folder-videos-symbolic"; + case 'song': return "folder-music-symbolic"; + case 'presentation': return "x-office-presentation-symbolic"; + default: return "slideshow-plugin"; + } + } color: { if (selected || mouseHandler.containsMouse || active)