mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:03:35 +02:00
Merge branch 'FB10334' of https://github.com/elderorb/hifi into pr-11960-for-rc-61
This commit is contained in:
commit
aa0d581236
1 changed files with 31 additions and 9 deletions
|
@ -20,6 +20,8 @@ import "../"
|
||||||
import "../toolbars"
|
import "../toolbars"
|
||||||
import "../../styles-uit" as HifiStyles
|
import "../../styles-uit" as HifiStyles
|
||||||
import "../../controls-uit" as HifiControls
|
import "../../controls-uit" as HifiControls
|
||||||
|
import QtQuick.Controls 2.2 as QQC2
|
||||||
|
import QtQuick.Templates 2.2 as T
|
||||||
|
|
||||||
// references HMD, AddressManager, AddressBarDialog from root context
|
// references HMD, AddressManager, AddressBarDialog from root context
|
||||||
|
|
||||||
|
@ -223,7 +225,7 @@ StackView {
|
||||||
visible: addressLine.text.length === 0
|
visible: addressLine.text.length === 0
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
QQC2.TextField {
|
||||||
id: addressLine
|
id: addressLine
|
||||||
width: addressLineContainer.width - addressLineContainer.anchors.leftMargin - addressLineContainer.anchors.rightMargin;
|
width: addressLineContainer.width - addressLineContainer.anchors.leftMargin - addressLineContainer.anchors.rightMargin;
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -238,16 +240,36 @@ StackView {
|
||||||
addressBarDialog.keyboardEnabled = false;
|
addressBarDialog.keyboardEnabled = false;
|
||||||
toggleOrGo();
|
toggleOrGo();
|
||||||
}
|
}
|
||||||
placeholderText: "Type domain address here"
|
|
||||||
|
// unfortunately TextField from Quick Controls 2 disallow customization of placeHolderText color without creation of new style
|
||||||
|
property string placeholderText2: "Type domain address here"
|
||||||
verticalAlignment: TextInput.AlignBottom
|
verticalAlignment: TextInput.AlignBottom
|
||||||
style: TextFieldStyle {
|
|
||||||
textColor: hifi.colors.text
|
font {
|
||||||
placeholderTextColor: "gray"
|
family: hifi.fonts.fontFamily
|
||||||
font {
|
pixelSize: hifi.fonts.pixelSize * 0.75
|
||||||
family: hifi.fonts.fontFamily
|
}
|
||||||
pixelSize: hifi.fonts.pixelSize * 0.75
|
|
||||||
|
color: hifi.colors.text
|
||||||
|
background: Item {}
|
||||||
|
|
||||||
|
QQC2.Label {
|
||||||
|
T.TextField {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
padding: 6 // numbers taken from Qt\5.9.2\Src\qtquickcontrols2\src\imports\controls\TextField.qml
|
||||||
|
leftPadding: padding + 4
|
||||||
}
|
}
|
||||||
background: Item {}
|
|
||||||
|
font: parent.font
|
||||||
|
|
||||||
|
x: control.leftPadding
|
||||||
|
y: control.topPadding
|
||||||
|
|
||||||
|
text: parent.placeholderText2
|
||||||
|
verticalAlignment: "AlignVCenter"
|
||||||
|
color: 'gray'
|
||||||
|
visible: parent.text === ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue