Have a warning when a component is exported from the main file and
doesn't inherit Window.
Unless it's the last component, for compatibility with Slint 1.6
Also don't warn in the interpreter
This reverts commit 66652cdc1d.
The warning in the gallery are hard to fix because the component inherit
from a layout and there is nowhere to place the popups
Preparation for multi-components
Note that this had to rename one instance of TextStyle because it
conflicts with the struct of the same name used in the FontSettings
in the style. This wasn't a problem before because it shares some
property in common, and the the order of processing of component has
changed leading to the other one being generated.
(But that is a wider bug in the compiler outside of the scope of this
refactoring)
This adds a new wrapping mode called `char-wrap`, which allows for wrapping at any character.
Currently, it only supports the Qt backend, with the other backends falling back to `word-wrap` when this option is selected.
There currently still can only be one because the passes expect that,
but now the LLR and generator should be ready to accept multiple public
component later
Use this snapshot to keep a unoptimized typeloader around, so that the preview
does not need to do another parsing run.
Move the document cache in the preview over to use the snapshot.
The compile_syntax_node was used by the syntax_test in case of error
to still cover the coverage, but commit e3908cfce6
made this function a noop when there is an error already.
The LSP does try to build an object tree even though there are error in
order to have the most information even in that case, so we must ensure
that it doesn't panic left and right.
This commit also fix some of these panics.
ammend previous commit to fix building the examples
When inlining things inside a Popup, we must process the popups first.
But in order to inline the popup inside another component, we must
process the popups last.
This makes the code a bit more complicated
This fix the C++ todo test that wasn't run because of a typo
When an element is optimized in another one, only the first one should
report the accessible properties. (because element with accessible
properties cannot be optimized so they are always the first)
Fixes#5023
* Implemented resizing for non-decorated winit windows
* Fixed formatting
* Changed direction match to use a tuple, reduced resize border size, returned after handling resize
* Added is resizable check for before resizing winit window
* Added resize-border property to window
* Formatted code
* Change resize-border from float to length
Contrary to the ListView that needs a minimum size and can be scrolled,
the TableView needs the cell to be ellided and don't have a minimum size
Fixes#5285
Keep merging elements, but remember the boundaries in the debug info, separated by a slash.
Also fixed tests that rely on accessible-label being set only once. For example
```
Button { text: "foo"; }
```
will certainly have "foo" as accessible-label on `Button`, but its internal `Text` element has
an implicit "accessible-label" set to the same
value.
So don't rely on that for now but search by id instead.