Merge branch 'ebf201903201404' of cwtch.im/ui into master
This commit is contained in:
commit
a552fe885b
|
@ -49,13 +49,23 @@ ColumnLayout {
|
|||
font.pixelSize: lbl.font.pixelSize
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
onActiveFocusChanged: {
|
||||
if (!activeFocus) {
|
||||
save()
|
||||
}
|
||||
}
|
||||
|
||||
Keys.onReturnPressed: {
|
||||
if (event.modifiers == Qt.NoModifier) {
|
||||
root.text = txt.text
|
||||
txt.visible = false
|
||||
lbl.visible = true
|
||||
root.updated(txt.text)
|
||||
save()
|
||||
}
|
||||
}
|
||||
|
||||
function save() {
|
||||
root.text = txt.text
|
||||
txt.visible = false
|
||||
lbl.visible = true
|
||||
root.updated(txt.text)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue