This removes the special code for the generated property getters and
ensures type safety in the run-time library for property value setting.
In the Rust generated code we continue to do arithmetic on the scalar
values, that means we immediately extract the scalar, do arithmetic and
rely on the compiler to only allow compatible units.
Danger zone alert: In the interpreter Value::Number can now be converted
to LogicalLength as-is.
- On the web, to return the image size, we need to use the natural size
of the image, and not its dom size, as the later get modified since
commit b727aba4a0
- The target size did not take in account the image fit, that's because
former version of resvg could only render by respecting the aspect
ratio. But since the web don't have this limitation, we now need to
take it into account. And new version of resvg can also scale with
any aspect ratio
Merge the type information of the properties into the value column as a
tooltip.
Also add some tag into the output via CSS: This should be replaced with
proper icons!
- We should not panic if the base type is invalid
- We should try to keep bindings in the Element even if the base type
is invalid
- Fix querying the element at a position in case it is not in the last
component of a file
Group property from the base class they are defined, and for built in
property, group them by category.
Also filter callback and other reserved properties that are not valid
for some elements.
Use `monaco.Uri` more in the internal parts of the `EditorWidget`, add
`TextRange` and `TextPosition` types and use them to data around.
Also fix a bug introduced when switching to the tree of items in the
outline editor and another small bug with the file tab name changing for
temporary files. Sorry for mixing this into this patch, but I discover
the issue while working on improving type safety.
Use the zero-line based lsp range/position types for the QueryProperties
lsp command results and convert them to monaco editor ranges for correct
text extraction.
Pros: the composition shows up as selected
Cons: te cursor is shown at the begining of the preselection, and
clicking on the field commit the selection at the wrong place
We used to have a hand-rolled URL to address the different files open in
the online editor. This got increasingly problematic as the monaco
editor, the slint language server, the previewer and the online editor
code all need to agree on those URLs to be able to cross-reference the
different files.
This patch makes sure we have the URL in ITextModel *only* und use that
consistently everywhere.