making header of list above the list as it flows upward
This commit is contained in:
parent
e60fcb8f56
commit
64e3978853
1 changed files with 32 additions and 25 deletions
|
@ -110,37 +110,44 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
header: Component {
|
header: Component {
|
||||||
Kirigami.ActionToolBar {
|
Rectangle {
|
||||||
|
id: songLibraryHeader
|
||||||
|
z: 2
|
||||||
height: 40
|
height: 40
|
||||||
width: parent.width
|
width: parent.width
|
||||||
display: Controls.Button.IconOnly
|
color: Kirigami.Theme.backgroundColor
|
||||||
visible: selectedLibrary == "songs"
|
Kirigami.ActionToolBar {
|
||||||
actions: [
|
height: parent.height
|
||||||
Kirigami.Action {
|
width: parent.width
|
||||||
icon.name: "document-new"
|
display: Controls.Button.IconOnly
|
||||||
text: "New Song"
|
visible: selectedLibrary == "songs"
|
||||||
tooltip: "Add a new song"
|
actions: [
|
||||||
onTriggered: songLibraryList.newSong()
|
Kirigami.Action {
|
||||||
/* visible: selectedLibrary == "songs" */
|
icon.name: "document-new"
|
||||||
},
|
text: "New Song"
|
||||||
|
tooltip: "Add a new song"
|
||||||
Kirigami.Action {
|
onTriggered: songLibraryList.newSong()
|
||||||
displayComponent: Component {
|
/* visible: selectedLibrary == "songs" */
|
||||||
Kirigami.SearchField {
|
},
|
||||||
id: searchField
|
|
||||||
height: parent.height
|
Kirigami.Action {
|
||||||
width: parent.width - 40
|
displayComponent: Component {
|
||||||
onAccepted: showPassiveNotification(searchField.text, 3000)
|
Kirigami.SearchField {
|
||||||
|
id: searchField
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width - 40
|
||||||
|
onAccepted: showPassiveNotification(searchField.text, 3000)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
/* visible: selectedLibrary == "songs" */
|
||||||
}
|
}
|
||||||
/* visible: selectedLibrary == "songs" */
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
easing.type: Easing.OutCubic
|
easing.type: Easing.OutCubic
|
||||||
duration: 300
|
duration: 300
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue