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:
Alexander Ivash 2018-04-06 00:39:04 +03:00 committed by Alexander Ivash
parent 3ce00acd16
commit 25a44edfce

View file

@ -34,6 +34,11 @@ TextField {
placeholderText: textField.placeholderText
property bool rightAnchorSet: false;
anchors.onRightChanged: {
rightAnchorSet = true;
}
font.family: "Fira Sans"
font.pixelSize: hifi.fontSizes.textFieldInput
height: implicitHeight + 3 // Make surrounding box higher so that highlight is vertically centered.
@ -165,11 +170,11 @@ TextField {
anchors.left: parent.left
Binding on anchors.right {
when: parent.right
value: parent.right
when: rightAnchorSet
value: textField.right
}
Binding on wrapMode {
when: parent.right
when: rightAnchorSet
value: Text.WordWrap
}