linphone-desktop/tests/ui/modules/Common/Form/TextEdit.qml
Ronan Abhamon 93c88e8a09 unstable
2016-12-08 12:22:56 +01:00

35 lines
790 B
QML

import QtQuick 2.7
import Common 1.0
import Common.Styles 1.0
// ===================================================================
TextInput {
id: textEdit
clip: true
color: activeFocus && !readOnly
? TextEditStyle.textColor.focused
: TextEditStyle.textColor.normal
padding: ListFormStyle.value.text.padding
selectByMouse: true
verticalAlignment: TextEdit.AlignVCenter
Keys.onEscapePressed: focus = false
Keys.onReturnPressed: focus = false
InvertedMouseArea {
anchors.fill: parent
enabled: textEdit.activeFocus
onPressed: textEdit.focus = false
}
Rectangle {
anchors.fill: textEdit
color: textEdit.activeFocus && !readOnly
? TextEditStyle.backgroundColor.focused
: TextEditStyle.backgroundColor.normal
z: -1
}
}