When having a binding such as
```
foo <=> bar
```
The default value will always be the value of `bar` regardless what's
the value of foo.
This change of behavior is the only one that makes sense bacause if we
are having repeater or if, this will be a problem. eg:
```
property <xxx> bar;
if (some_cndition) : SomeElement {
foo <=> bar;
}
```
Then we can't possibly take the default value of foo for the value of
bar since it depends on the condition. (and it is even worse in case of
repeater)
This is a change of behevior, this is why the tests have changed. The
cse of tests/cases/bindings/* were already covered by a warning since
0.3.0 so that should be fine. But the warning did not trigger for
builtin property such as `visible` (eg, input/visible_mouse test)
Also some internal two way bindings had to be reversed.
cc: #1394
Permit the style metrics to provide a `default-font-size` and bind that
to the `Window` if set. If not provided, then the backend can set a
`default-font-size`. By ensuring that the value is non-zero at run-time,
we can later introduce a rem unit that can act as factor relative to
this non-zero font size.
No need to transfer ownership!
Also use `Url` directly instead of wrapping that into a
`TextDocumentIdentifier`. That way we can burrow the URL and do not need
to clone a `Url` into a `TextDocumentIdentifier` just so we can borrow
that.
This requires the following changes:
- Delay configuring SlintConfig.cmake:
Corrosion sets the `IMPORTED` locations late to allow us to set
OUTPUT_DIRECTORY target properties. The configuration of
SlintConfig.cmake must be deferred until after Corrosion set the
locations. Since we are writing to a config file Generator expressions
are not an option.
- Remove BUILD_TYPE mapping from SlintConfig.cmake:
As discussed in https://github.com/slint-ui/slint/pull/1785#issuecomment-1294630845
remove the mapping of the build types since corrosion now always sets
the `IMPORTED_LOCATION` property.
User facing improvements enabled by the update:
- Corrosion will not fail anymore if the user has a Rust toolchain >=1.60
installed, but the default toolchain is < 1.60.
- Corrosion will respect OUTPUT_DIRECTORY properties and move target
artifacts to the expected locations
Now it's also possible to toggle checked by click on the text of the CheckBox similar to fluent design
GroupBox now respect the minimum width of the title, to avoid elision
Adopt SpinBox: set focus when buttons are clicked #1795 on md SpinBox
* Do not use wasm build in conjunction with `preview` to keep code lense
support on. Add `preview-lense` feature instead.
* Improve which parts of the LSP are kept based on these features.
With this patch a LSP built for the online-editor is about 10KB smaller
than before.
Python recently was updated to 3.11 and the build of the node binding is
now failing.
(Apparently still using a quite old version of node-gyp, because this
was fixed in `https://github.com/nodejs/node-gyp/issues/2219`)
```
File "/home/runner/work/slint/slint/target/debug/build/neon-sys-4b140f4af6e7aeb3/out/native/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 239, in LoadOneBuildFile
build_file_contents = open(build_file_path, "rU").read()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU' while trying to load binding.gyp
```
We already avoid parsing `slint_testing.h`. But we have a variant of
`send_keyboard_string_sequence` in `slint_interpreter.h` because the
function takes a ComponentInstance. Exclude all symbols from that
namespace from the docs to continue the intent.
LSP is 0 based wrt. lines and columns, Monaco is 1 based.
LSP encodes the end of a Range as the first character *outside* of the
range, while Monaco expects the last character still *inside* the range.
Extract values for colors and fonts into colors.css file and use those
variables.
Also adapt some of the color values to match those used on the web site
more closely.
This prepares our side of the code for changing themes later.