Move those two classes into the private_api namespace, which is excluded
from the API reference documentation.
For generate code the explicit qualification of Property<T> is changed,
for the cbindgen generated item types the private_api namespace is
pulled into the cbindgen_private namespace.
A few problem:
- the horizontal and vertical property were swapped
- The implementation of the "preferred_xxx" property was not materialized properly
because the `bindings` were borrowed in the materialize_fake_properties pass
- Since the Window has a stretch factor of 0., the preferred size of the inner layout
was not taken into account when merging the LayoutInfo. I believe taking the
maximum preferred size is the right solution when merging them.
Split the vertical and horizontal pass into different property cache
This will allow to implement "height for with"
This patch does not port the Rust or C++ binding yet
We need to do the ensure_window pass before the binding_analysis
otherwise the with and height property of the root element
will be considered as constant and will not adapt to the window size.
Unfortunately we can't really test that now because our test system
doesn't really test the Window, but here is a testcase:
```
MainWindow := Rectangle {
preferred-width: 400px;
preferred-height: 400px;
background: yellow;
VerticalLayout {
Rectangle {
background: red;
Text { text: root.width / 1px; }
}
}
}
```
(we should see the red rectangle)
We need to account for all parent element.
Previously we skipped layouts because they did not have a x/y property,
but now they are lowered as Rectangle so they should have one
this implies that we need to make sure the property are initialized in
order so that constant properties that depends on other constant properties
are correctly computed
The pass must be done at the begining so that synthetised property don't
become public, and also so that analyses pass can use the public api information
- Mark builtin properties that are modified by the native code as output
- Record wether the property is set by code in the .60
- Add a field that will tell us if a property binding is constant
Let's keep source compatibility and define `drop-shadow-blur` to be a radius.
The CSS spec says that the standard deviation is half of the radius.
We just need to scale again and increase the shadow rect to make sure that no borders are visible.