Commit 93c88e8a authored by Ronan Abhamon's avatar Ronan Abhamon

unstable

parent 507f8066
...@@ -112,10 +112,11 @@ RowLayout { ...@@ -112,10 +112,11 @@ RowLayout {
implicitHeight: textEdit.height implicitHeight: textEdit.height
width: parent.width width: parent.width
TextEdit { TextEdit {
id: textEdit id: textEdit
text: $value text: $value
width: 300
height: ListFormStyle.lineHeight height: ListFormStyle.lineHeight
onEditingFinished: _handleEditionFinished(index, text) onEditingFinished: _handleEditionFinished(index, text)
......
...@@ -11,13 +11,13 @@ Item { ...@@ -11,13 +11,13 @@ Item {
property alias font: textEdit.font property alias font: textEdit.font
property alias color: textEdit.color property alias color: textEdit.color
signal editionFinished signal editingFinished
// ----------------------------------------------------------------- // -----------------------------------------------------------------
function _handleEditionFinished () { function _handleEditingFinished () {
textEdit.cursorPosition = 0 textEdit.cursorPosition = 0
editionFinished() editingFinished()
} }
// ----------------------------------------------------------------- // -----------------------------------------------------------------
...@@ -66,7 +66,6 @@ Item { ...@@ -66,7 +66,6 @@ Item {
color: activeFocus && !readOnly color: activeFocus && !readOnly
? TextEditStyle.textColor.focused ? TextEditStyle.textColor.focused
: TextEditStyle.textColor.normal : TextEditStyle.textColor.normal
padding: ListFormStyle.value.text.padding
selectByMouse: true selectByMouse: true
width: flick.width width: flick.width
wrapMode: Text.Wrap wrapMode: Text.Wrap
...@@ -75,7 +74,7 @@ Item { ...@@ -75,7 +74,7 @@ Item {
Keys.onReturnPressed: focus = false Keys.onReturnPressed: focus = false
onCursorRectangleChanged: flick._ensureVisible(cursorRectangle) onCursorRectangleChanged: flick._ensureVisible(cursorRectangle)
onEditingFinished: _handleEditionFinished() onEditingFinished: _handleEditingFinished()
} }
} }
} }
...@@ -5,16 +5,16 @@ import Common.Styles 1.0 ...@@ -5,16 +5,16 @@ import Common.Styles 1.0
// =================================================================== // ===================================================================
TextEdit { TextInput {
id: textEdit id: textEdit
clip: true
color: activeFocus && !readOnly color: activeFocus && !readOnly
? TextEditStyle.textColor.focused ? TextEditStyle.textColor.focused
: TextEditStyle.textColor.normal : TextEditStyle.textColor.normal
padding: ListFormStyle.value.text.padding padding: ListFormStyle.value.text.padding
selectByMouse: true selectByMouse: true
verticalAlignment: TextEdit.AlignVCenter verticalAlignment: TextEdit.AlignVCenter
wrapMode: Text.Wrap
Keys.onEscapePressed: focus = false Keys.onEscapePressed: focus = false
Keys.onReturnPressed: focus = false Keys.onReturnPressed: focus = false
......
...@@ -111,8 +111,10 @@ ColumnLayout { ...@@ -111,8 +111,10 @@ ColumnLayout {
text: avatar.username text: avatar.username
onEditionFinished: { onEditingFinished: {
_contact.username = text _contact.username = text
// Update current text with new username.
text = _contact.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