Commit 93c88e8a authored by Ronan's avatar Ronan
Browse files

unstable

parent 507f8066
......@@ -112,10 +112,11 @@ RowLayout {
implicitHeight: textEdit.height
width: parent.width
TextEdit {
TextEdit {
id: textEdit
text: $value
width: 300
height: ListFormStyle.lineHeight
onEditingFinished: _handleEditionFinished(index, text)
......
......@@ -11,13 +11,13 @@ Item {
property alias font: textEdit.font
property alias color: textEdit.color
signal editionFinished
signal editingFinished
// -----------------------------------------------------------------
function _handleEditionFinished () {
function _handleEditingFinished () {
textEdit.cursorPosition = 0
editionFinished()
editingFinished()
}
// -----------------------------------------------------------------
......@@ -66,7 +66,6 @@ Item {
color: activeFocus && !readOnly
? TextEditStyle.textColor.focused
: TextEditStyle.textColor.normal
padding: ListFormStyle.value.text.padding
selectByMouse: true
width: flick.width
wrapMode: Text.Wrap
......@@ -75,7 +74,7 @@ Item {
Keys.onReturnPressed: focus = false
onCursorRectangleChanged: flick._ensureVisible(cursorRectangle)
onEditingFinished: _handleEditionFinished()
onEditingFinished: _handleEditingFinished()
}
}
}
......@@ -5,16 +5,16 @@ import Common.Styles 1.0
// ===================================================================
TextEdit {
TextInput {
id: textEdit
clip: true
color: activeFocus && !readOnly
? TextEditStyle.textColor.focused
: TextEditStyle.textColor.normal
padding: ListFormStyle.value.text.padding
selectByMouse: true
verticalAlignment: TextEdit.AlignVCenter
wrapMode: Text.Wrap
Keys.onEscapePressed: focus = false
Keys.onReturnPressed: focus = false
......
......@@ -111,8 +111,10 @@ ColumnLayout {
text: avatar.username
onEditionFinished: {
onEditingFinished: {
_contact.username = text
// Update current text with new username.
text = _contact.username
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment