some tweaks to the library components
This commit is contained in:
parent
ecebddf557
commit
990edf3818
2 changed files with 12 additions and 7 deletions
|
@ -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("");
|
||||
})
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue