Changeset View
Changeset View
Standalone View
Standalone View
desktoppackage/contents/views/Panel.qml
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Line(s) | 64 | onContainmentChanged: { | |||
---|---|---|---|---|---|
70 | containment.anchors.fill = containmentParent; | 70 | containment.anchors.fill = containmentParent; | ||
71 | containment.locationChanged.connect(adjustPrefix); | 71 | containment.locationChanged.connect(adjustPrefix); | ||
72 | adjustPrefix(); | 72 | adjustPrefix(); | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | Binding { | 75 | Binding { | ||
76 | target: panel | 76 | target: panel | ||
77 | property: "length" | 77 | property: "length" | ||
78 | when: containment | 78 | when: containment | ||
davidedmundson: in theory, this line should be doing that.
Any idea why it isn't? | |||||
eliasp: Unfortunately - no idea why it doesn't prevent that. | |||||
79 | value: { | 79 | value: { | ||
The binding is still evaluated and a value assigned to "value", it's just that Binding {} won't propagate it to its target when "when" doesn't evaluate true. broulik: The binding is still evaluated and a value assigned to "value", it's just that Binding {} won't… | |||||
80 | if (!containment) { | ||||
81 | return; | ||||
82 | } | ||||
80 | if (verticalPanel) { | 83 | if (verticalPanel) { | ||
81 | return containment.Layout.preferredHeight | 84 | return containment.Layout.preferredHeight | ||
82 | } else { | 85 | } else { | ||
83 | return containment.Layout.preferredWidth | 86 | return containment.Layout.preferredWidth | ||
84 | } | 87 | } | ||
85 | } | 88 | } | ||
86 | } | 89 | } | ||
87 | 90 | | |||
Show All 20 Lines |
in theory, this line should be doing that.
Any idea why it isn't?