fix pastebox weirdness

This commit is contained in:
erinn 2019-02-22 15:53:58 -08:00
parent 9d9baa3fe2
commit 6c57967d2f
1 changed files with 15 additions and 42 deletions

View File

@ -5,6 +5,9 @@ import QtQuick.Controls.Material 2.0
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Window 2.11 import QtQuick.Window 2.11
import QtQuick.Controls 1.4
import "../styles"
ColumnLayout { ColumnLayout {
id: root id: root
@ -200,49 +203,19 @@ ColumnLayout {
} }
} }
RowLayout { TextField {
anchors.left: parent.left anchors.horizontalCenter: parent.horizontalCenter
anchors.right: parent.right style: CwtchTextFieldStyle{ width: 400 }
placeholderText: "... paste an address here to add a contact ..."
horizontalAlignment: TextInput.AlignHCenter
onTextChanged: {
Rectangle { // ADD CONTACTS TEXTFIELD if (text != "") {
width: parent.width - 4 gcd.importString(text)
height: 20 text = ""
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
}
}
}
}
Connections { Connections {
target: gcd target: gcd