1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Usability tweaks

This commit is contained in:
Laurent Cozic 2016-12-29 21:56:43 +01:00
parent 42955187fa
commit e751dfc793

View File

@ -5,10 +5,12 @@ Item {
id: root id: root
width: parent.width width: parent.width
height: 25 height: 25
Text { Text {
id: label id: label
text: display text: display
anchors.fill: parent anchors.fill: parent
verticalAlignment: Text.AlignVCenter
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
@ -18,10 +20,12 @@ Item {
label.visible = false label.visible = false
textField.visible = true textField.visible = true
textField.focus = true textField.focus = true
console.info("Editing ", index) textField.selectAll()
textField.text = display
} }
} }
} }
TextField { TextField {
id: textField id: textField
text: display text: display
@ -29,11 +33,7 @@ Item {
width: parent.width width: parent.width
height: parent.height height: parent.height
onAccepted: { onAccepted: {
console.info(root.ListView.view.model);
console.info("Done ", index)
root.ListView.view.model.setData(index, text) root.ListView.view.model.setData(index, text)
//root.ListView.view.model.setDataInt(index, "trest")
//root.ListView.view.currentItem = "test"
} }
onEditingFinished: { onEditingFinished: {
label.visible = true label.visible = true