adding some fixes to the library
This commit is contained in:
parent
cc8f447166
commit
475a0abe3c
1 changed files with 12 additions and 2 deletions
|
@ -105,15 +105,17 @@ Item {
|
||||||
|
|
||||||
header: Component {
|
header: Component {
|
||||||
Kirigami.ActionToolBar {
|
Kirigami.ActionToolBar {
|
||||||
height: selectedLibrary == "songs" ? 40 : 0
|
height: 40
|
||||||
width: parent.width
|
width: parent.width
|
||||||
display: Button.IconOnly
|
display: Button.IconOnly
|
||||||
|
visible: selectedLibrary == "songs"
|
||||||
actions: [
|
actions: [
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
icon.name: "document-new"
|
icon.name: "document-new"
|
||||||
text: "New Song"
|
text: "New Song"
|
||||||
tooltip: "Add a new song"
|
tooltip: "Add a new song"
|
||||||
onTriggered: songLibraryList.newSong()
|
onTriggered: songLibraryList.newSong()
|
||||||
|
/* visible: selectedLibrary == "songs" */
|
||||||
},
|
},
|
||||||
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
|
@ -125,8 +127,9 @@ Item {
|
||||||
onAccepted: showPassiveNotification(searchField.text, 3000)
|
onAccepted: showPassiveNotification(searchField.text, 3000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* visible: selectedLibrary == "songs" */
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
@ -269,6 +272,13 @@ Item {
|
||||||
function newSong() {
|
function newSong() {
|
||||||
songsqlmodel.newSong();
|
songsqlmodel.newSong();
|
||||||
songLibraryList.currentIndex = songsqlmodel.rowCount();
|
songLibraryList.currentIndex = songsqlmodel.rowCount();
|
||||||
|
if (!editMode)
|
||||||
|
toggleEditMode();
|
||||||
|
song = songLibraryList.currentItem
|
||||||
|
songTitle = songLibraryList.currentItem.title
|
||||||
|
songLyrics = songLibraryList.currentItem.lyrics
|
||||||
|
songAuthor = songLibraryList.currentItem.author
|
||||||
|
songVorder = songLibraryList.currentItem.vorder
|
||||||
showPassiveNotification("newest song index: " + songLibraryList.currentIndex)
|
showPassiveNotification("newest song index: " + songLibraryList.currentIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue