diff --git a/qml/widgets/MyProfile.qml b/qml/widgets/MyProfile.qml index b227e92..5b2b1dd 100644 --- a/qml/widgets/MyProfile.qml +++ b/qml/widgets/MyProfile.qml @@ -5,6 +5,9 @@ import QtQuick.Controls.Material 2.0 import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.3 import QtQuick.Window 2.11 +import QtQuick.Controls 1.4 + +import "../styles" ColumnLayout { id: root @@ -200,49 +203,19 @@ ColumnLayout { } } - RowLayout { - anchors.left: parent.left - anchors.right: parent.right + TextField { + anchors.horizontalCenter: parent.horizontalCenter + style: CwtchTextFieldStyle{ width: 400 } + placeholderText: "... paste an address here to add a contact ..." + horizontalAlignment: TextInput.AlignHCenter - - Rectangle { // ADD CONTACTS TEXTFIELD - width: parent.width - 4 - height: 20 - color: "#EDEDED" - border.color: "#AAAAAA" - border.width: 1 - radius: 10 - anchors.horizontalCenter: parent.horizontalCenter - - - TextEdit { - property string hint: "... paste an address here to add a contact ..." - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - font.pixelSize: 9 - color: "#888888" - padding: 2 - text: hint - selectByMouse: true - - onTextChanged: { - if (text != hint && text != "") { - console.log("to handle: "+text) - gcd.importString(text) - text = hint - } - } - - onFocusChanged: { - text = focus ? "" : hint - } - - onCursorPositionChanged: { - text = focus ? "" : hint - } - } - } - } + onTextChanged: { + if (text != "") { + gcd.importString(text) + text = "" + } + } + } Connections { target: gcd