Last commit uncovered some bug in which the second phase of inlining
tries to inline children in the wrong place
(This usually inlines zero children as it was already done in the first
phase, but we still assert that the location is right)
And use that in the lsp/ui implementation instead of comments.
This is only a parser support for now, the name is otherwise unused.
Hence I rather keep that experimental.
The test's build.rs invokes the compiler repeatedly with a configuration that enables font embedding. Instead of loading the same font with fontdue repeatedly (slow), store the loaded fonts in a hash table for re-use.
This should not have any impact on single file compilations, but it helps with the screenshot driver test dramatically, bringing down the time of
touch tests/screenshots/build.rs
cargo build -p test-driver-screenshots
on my xps13 linux from 1m26s to 15s.
Enable the use of parallel glyph outline extraction in fontdue.
Brings down the time of
touch tests/screenshots/build.rs
cargo build -p test-driver-screenshots
on my xps13 linux from 3m30s to 1m26s.
- Make sure that in Rust and C++ we also truncate if the properties are
inlined
- Change the interpreter to truncate
This is a redo of commit f5d003d but truncate instead of round
fixes#5689
Now that the properties are only used in the live preview,
we can simplify the code a bit.
This gets rid of some sanity checks in the code path as well,
which in turn should fix#5696.
Fixes: #5696
In rust, use f32 instead of f64 for arithmetic comparison.
In the interpreter, use approx_eq
The test is failling in nightly because of precision change in `log`.
By using f32, it actually should work
Also Revert "Disable builds with nightly Rust temporarily"
This reverts commit 4afc3a2e84.
Fixes#5722
The crate uses an old version of lazy_static that doesn't seem to reliably compiler with newer versions of Rust.
This is a partial fix for #5702 as all the compiler needs is the named color table.
Round the value.
The previous behavior is that
- For the interpreter, we were rounding (same as new behavior)
- for Rust and C++ we were truncating, unless the properties were
inlinined and then we were keeping it as float
Fix#5646
Qt is a bit more involved since it always put scrollbar if there is a ScrollArea and we can't
easily know the size to which make the popup. That's why it needs two popups
We were trying to convert a node to a wrong kind of node.
Then of course it didn't have the expected children
In debug mode you'd have
```
assertion `left == right` failed
left: SubElement
right: Component
```
from the debug_assert! in `$Node::from`
I changed the call to `.into` to a call to `$Node::new` that return an
option.
Also made the debug_assert into an assert and added track_caller so such
problem are easier to debug in the future. (Retrospectively, we probably
shouldn't have derived From for $Node)
Fix#5642
The change contains no tests because the is_recursive_inclusion function
is currently not tested and would need some effort to create a test
Commit 3764312561 accidentally chained filter_map so that the list of default (fallback) fonts was empty. That resulted in
a simple hello world (with no custom fonts) embedding no font at all and causing a run-time error.
Instead of replacing the existing x/y properties with "invisible" ones, let's just keep those that we have and merely zero out the geometry x/y.
This has the bonus that access to x/y within the PopupWindow will provide the right value, i.e.
popup := PopupWindow {
x: 42px;
Text { text: popup.text / 1px; }
}
will show "42" instead of zero.
Since x/y are now merely referenced via the NamedReferences in PopupWindow, this patch also fixes the property materialization pass to use
visit_all_named_references(component) to also visit the x/y named refs,
instead of visit_all_named_references_in_element() that skips them.