From 10d1440f5d6ed76ac3c36d028f97d27853b69770 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 24 Sep 2024 14:38:52 -0500 Subject: [PATCH] fixing LibraryItem's subtitles --- src/qml/presenter/LibraryItem.qml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/qml/presenter/LibraryItem.qml b/src/qml/presenter/LibraryItem.qml index 2918c59..1169054 100644 --- a/src/qml/presenter/LibraryItem.qml +++ b/src/qml/presenter/LibraryItem.qml @@ -251,15 +251,23 @@ ColumnLayout { implicitWidth: libraryList.width height: selectedLibrary == libraryType ? 50 : 0 text: title - - /* subtitle: { */ - /* if (libraryType == "song") */ - /* author */ - /* else if (fileValidation) */ - /* filePath; */ - /* else */ - /* "file is missing" */ - /* } */ + + Controls.Label { + anchors.top: parent.verticalCenter + anchors.topMargin: Kirigami.Units.gridUnit / 2 + anchors.left: parent.left + anchors.leftMargin: Kirigami.Units.gridUnit * 1.7 + font.pointSize: 9 + text: { + if (libraryType == "song") + author + else if (fileValidation) + filePath.substr(7); + else + "file is missing"; + } + elide: Text.ElideRight + } icon.source: itemIcon icon.width: Kirigami.Units.gridUnit