Merge pull request #13353 from vladest/address_dialog_focus_fix

Remove extra textfield fro address bar input
This commit is contained in:
Seth Alves 2018-07-06 09:00:00 -07:00 committed by GitHub
commit c0e1e9c23a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,6 +89,7 @@ StackView {
property bool keyboardEnabled: false property bool keyboardEnabled: false
property bool punctuationMode: false property bool punctuationMode: false
property bool keyboardRaised: false
width: parent.width width: parent.width
height: parent.height height: parent.height
@ -210,6 +211,8 @@ StackView {
QQC2.TextField { QQC2.TextField {
id: addressLine id: addressLine
focus: true
width: addressLineContainer.width - addressLineContainer.anchors.leftMargin - addressLineContainer.anchors.rightMargin; width: addressLineContainer.width - addressLineContainer.anchors.leftMargin - addressLineContainer.anchors.rightMargin;
anchors { anchors {
left: addressLineContainer.left; left: addressLineContainer.left;
@ -236,24 +239,20 @@ StackView {
color: hifi.colors.text color: hifi.colors.text
background: Item {} background: Item {}
QQC2.Label { }
T.TextField {
id: control
padding: 6 // numbers taken from Qt\5.9.2\Src\qtquickcontrols2\src\imports\controls\TextField.qml QQC2.Label {
leftPadding: padding + 4 font: addressLine.font
}
font: parent.font x: addressLine.x
y: addressLine.y
leftPadding: addressLine.leftPadding
topPadding: addressLine.topPadding
x: control.leftPadding text: addressLine.placeholderText2
y: control.topPadding verticalAlignment: "AlignVCenter"
color: 'gray'
text: parent.placeholderText2 visible: addressLine.text === ''
verticalAlignment: "AlignVCenter"
color: 'gray'
visible: parent.text === ''
}
} }
Rectangle { Rectangle {