mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-19 12:40:10 +02:00
fix conditional bindings
note: unfortunately there is no way to understand whether the item was anchored as even not anchored item has some anchors
This commit is contained in:
parent
3ce00acd16
commit
25a44edfce
1 changed files with 8 additions and 3 deletions
|
@ -34,6 +34,11 @@ TextField {
|
||||||
|
|
||||||
placeholderText: textField.placeholderText
|
placeholderText: textField.placeholderText
|
||||||
|
|
||||||
|
property bool rightAnchorSet: false;
|
||||||
|
anchors.onRightChanged: {
|
||||||
|
rightAnchorSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
font.family: "Fira Sans"
|
font.family: "Fira Sans"
|
||||||
font.pixelSize: hifi.fontSizes.textFieldInput
|
font.pixelSize: hifi.fontSizes.textFieldInput
|
||||||
height: implicitHeight + 3 // Make surrounding box higher so that highlight is vertically centered.
|
height: implicitHeight + 3 // Make surrounding box higher so that highlight is vertically centered.
|
||||||
|
@ -165,11 +170,11 @@ TextField {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
Binding on anchors.right {
|
Binding on anchors.right {
|
||||||
when: parent.right
|
when: rightAnchorSet
|
||||||
value: parent.right
|
value: textField.right
|
||||||
}
|
}
|
||||||
Binding on wrapMode {
|
Binding on wrapMode {
|
||||||
when: parent.right
|
when: rightAnchorSet
|
||||||
value: Text.WordWrap
|
value: Text.WordWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue