instead of panicking
We need to mve stuff in the parent element and that doesn't work if
it is a repeated element. Also there would not be ways to call show
on it anyway.
Fixes#1079
The problem is that if some bindings are coming from already inlined elements
they should have a higher priority field, so that whenmerging the two way
binding, we keep the least deep value
Fixes: #1026
- We need to make sure that the initialization of global is in the right order.
- In C++ and rust, we need to add accessor to the global component
- There can be `PropertyReference::Global` in binding of globals
- The interpreter globals need to hold references to the global they may depend on
Fixes#175
... also for oarent component.
The previous code did not set it as set for the parent components
causing the properties to be marked as const while they shouldn't
Fixes#983
The code was mixing logical and physical sizes, causing glyphs being
doubly scaled down. Instead, this patch introduces:
* Physical* and Logical* euclid length/size/rect aliases
* some extraction traits for getting the scalars in rects/sizes as lengths (until euclid has them
built-in)
* wrapper traits/types for safely extracting the physical font metrics the
compiler generates (i16)
* Fix a bug in the text height calculation where we failed to take the
descent into account
Since they can be set from the native code
The current code in NamedReference::is_constant and such always check for
expose_in_public_api already, this is now redundent
Enable with `SLINT_EMBED_GLYPHS=1` and select sizes like
`SLINT_FONT_SIZES=12,16`
This change just puts the data structures in place, rasterizes a fixed
subset, embeds that into the rust generated code and calls a backend
function for registering the font that is unimplemented.
Do the default_geometry pass before injecting elements:
The reason is that the defaut_geometry pass must know if an element is in
a layout and what kind of default geometry needs to be applied depending
on its actual structure, not whatever results after we injected elements
We were relying on the default_geometry pass to set the size of elements,
but that doesn't work for elements that are not covering 100% of their
parents by default. So to that manually instead.
Fixes#915
We need to simplify all the optimized items before the move_declaration pass
This include innter item of repeater that might be used by layouts
But that also means we can now uptimize children of layouts
Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.
pre-commit applied some cleanups to the moved files:
- Consistent newline at end of file policy
- trimming trailing whitespace
- Formatting Cargo.toml files.