diff --git a/src/qml/presenter/Library.qml b/src/qml/presenter/Library.qml index a42b496..e3b553d 100644 --- a/src/qml/presenter/Library.qml +++ b/src/qml/presenter/Library.qml @@ -36,7 +36,8 @@ Item { libraryType: "song" headerLabel: "Songs" itemIcon: "folder-music-symbolic" - itemSubtitle: model.author + /* itemSubtitle: model.author */ + count: innerModel.rowCount() newItemFunction: (function() { songProxyModel.setFilterRegularExpression(""); songProxyModel.songModel.newSong(); @@ -63,7 +64,8 @@ Item { libraryType: "video" headerLabel: "Videos" itemIcon: "folder-videos-symbolic" - itemSubtitle: model.path + /* itemSubtitle: model.path */ + count: innerModel.count() newItemFunction: (function() { videoProxyModel.setFilterRegularExpression(""); }) @@ -83,7 +85,8 @@ Item { libraryType: "image" headerLabel: "Images" itemIcon: "folder-pictures-symbolic" - itemSubtitle: model.path + /* itemSubtitle: model.path */ + count: imageProxyModel.imageModel.count() newItemFunction: (function() { imageProxyModel.setFilterRegularExpression(""); }) @@ -103,7 +106,8 @@ Item { libraryType: "presentation" headerLabel: "Presentations" itemIcon: "x-office-presentation-symbolic" - itemSubtitle: model.path + /* itemSubtitle: model.path */ + count: innerModel.count() newItemFunction: (function() { presProxyModel.setFilterRegularExpression(""); }) diff --git a/src/qml/presenter/LibraryItem.qml b/src/qml/presenter/LibraryItem.qml index ee3359a..8bc5d5e 100644 --- a/src/qml/presenter/LibraryItem.qml +++ b/src/qml/presenter/LibraryItem.qml @@ -17,6 +17,7 @@ ColumnLayout { property string itemLabel property string itemSubtitle property string itemIcon + property string count property var newItemFunction property var deleteItemFunction property ListView libraryList: libraryList @@ -66,11 +67,11 @@ ColumnLayout { } Controls.Label { - id: count + id: countLabel anchors {left: libraryLabel.right verticalCenter: libraryLabel.verticalCenter leftMargin: 15} - text: libraryType == "song" ? innerModel.rowCount() : innerModel.count(innerModel) + text: count color: Kirigami.Theme.disabledTextColor } @@ -229,7 +230,7 @@ ColumnLayout { clip: true label: title subtitle: { - if (selectedLibrary == "song") + if (libraryType == "song") author else if (fileValidation) filePath;