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.
We must create the window first to initialize the backend before
the style is called because it would initialize qt as a plugin instead
of as a proper application, and it would then not initialize the high dpi mode
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
The README.md contains the warning that used to be in lib.rs.
Add README.md files to all internal crates
... pointing to the official public crate to use instead.
Rename internal crates
fixup: README files
fixup rename
If a callback returning voids ends in a statement that returns something,
we would have an error in the rust generated code as we end our function
with an expression that is not `()`
Step to reproduce:
```
xx := Window {
TouchArea {
clicked => {
if (true) {}
// note: because there is no else, the semantic colouring is bailing out now
}
}
TouchArea { clicked => {} }
}
```
This is caused by a bug in rowan::SyntaxToken::next_token that doesn't visit
the next token if it has an empty node
Unfortunately, the LSP has no tests, so I couldn't add one easily
Examples will be able to use the logo from their location in `../../../logo/xxx.svg`
Some other things that needs to have the logo in their directory can use symlinks.
But because of the situation of windows, we can't use symlink for things our users
need to build and this is the case for the compiler-internal (because the C++ build
use the code from the repository), so there is a copy of the 'full' logo in
internal/comoiler/widgets/common