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.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