mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-23 06:38:07 +00:00
unstable
This commit is contained in:
parent
507f8066e9
commit
93c88e8a09
4 changed files with 11 additions and 9 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue