Merge branch 'ebf201902221553' of cwtch.im/ui into master

This commit is contained in:
Sarah Jamie Lewis 2019-02-22 23:55:57 +00:00 committed by Gogs
commit d95760cdca
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,46 +203,16 @@ ColumnLayout {
} }
} }
RowLayout { TextField {
anchors.left: parent.left
anchors.right: parent.right
Rectangle { // ADD CONTACTS TEXTFIELD
width: parent.width - 4
height: 20
color: "#EDEDED"
border.color: "#AAAAAA"
border.width: 1
radius: 10
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
style: CwtchTextFieldStyle{ width: 400 }
placeholderText: "... paste an address here to add a contact ..."
TextEdit { horizontalAlignment: TextInput.AlignHCenter
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: { onTextChanged: {
if (text != hint && text != "") { if (text != "") {
console.log("to handle: "+text)
gcd.importString(text) gcd.importString(text)
text = hint text = ""
}
}
onFocusChanged: {
text = focus ? "" : hint
}
onCursorPositionChanged: {
text = focus ? "" : hint
}
} }
} }
} }