forked from cwtch.im/ui
Merge branch 'ebf201902221553' of cwtch.im/ui into master
This commit is contained in:
commit
d95760cdca
|
@ -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,46 +203,16 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
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
|
||||
TextField {
|
||||
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
|
||||
style: CwtchTextFieldStyle{ width: 400 }
|
||||
placeholderText: "... paste an address here to add a contact ..."
|
||||
horizontalAlignment: TextInput.AlignHCenter
|
||||
|
||||
onTextChanged: {
|
||||
if (text != hint && text != "") {
|
||||
console.log("to handle: "+text)
|
||||
if (text != "") {
|
||||
gcd.importString(text)
|
||||
text = hint
|
||||
}
|
||||
}
|
||||
|
||||
onFocusChanged: {
|
||||
text = focus ? "" : hint
|
||||
}
|
||||
|
||||
onCursorPositionChanged: {
|
||||
text = focus ? "" : hint
|
||||
}
|
||||
text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue