1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-03 23:50:33 +02:00
Files
joplin/QtClient/JoplinQtClient/NoteList.qml

47 lines
822 B
QML
Raw Normal View History

2016-12-10 22:39:53 +00:00
import QtQuick 2.0
import QtQuick.Controls 2.0
Item {
id: root
property alias model: listView.model
property alias currentIndex: listView.currentIndex
2016-12-14 21:50:26 +00:00
property alias currentItem: listView.currentItem
2016-12-10 22:39:53 +00:00
Rectangle {
2016-12-11 16:09:39 +00:00
color: "#ffeeee"
border.color: "#00ff00"
2016-12-10 22:39:53 +00:00
anchors.fill: parent
}
Component {
2016-12-11 16:09:39 +00:00
id: noteDelegate
2016-12-10 22:39:53 +00:00
Item {
width: parent.width
height: 25
Text {
text: display
}
MouseArea {
anchors.fill: parent
onClicked: {
listView.currentIndex = index
}
}
}
}
ListView {
id: listView
anchors.fill: parent
2016-12-11 16:09:39 +00:00
delegate: noteDelegate
2017-01-12 18:16:39 +01:00
highlightMoveVelocity: -1
highlightMoveDuration: 100
2016-12-10 22:39:53 +00:00
ScrollBar.vertical: ScrollBar { }
highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
focus: true
onCurrentItemChanged: {
root.currentItemChanged()
}
}
}