... by changing the resolution for the `WindowItem` to traverse the
item tree from the current item, instead of going to the window.
This doesn't quite fix#4298 because `rem` resolution is still missing.
That requires the built-in default font size function to be fixed as
well, which is non-trivial.
cc #4298
Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
We were having a reference to the parent item tree, assuming the parent
was living longer than the item tree. But this is not the case if
there existed a ItemRc to one item in the inner part.
So use a Weak for the parent instead.
The main change is that the window adapter is not copied into
sub-components anymore - instead it is accessed through the root. This
is especially important for globals.
In order to add the root, a little extra dance had to be performance on
instantiation: The self_rc/self_weak is created first and the
ComponentExtraData's fields are populated via once_cells.
Consume the Rc in the function signature where the implementation would clone it anyway.
This is also needed in preparation for InstanceRef::window_adapter()
walking up the tree of components,
by which it's not possible to return a reference anymore as
parent_instance() returns a new lifetime that's shorter than &self
inside window_adapter().
Replace all call sites that call unwrap() on window_adapter_ref() with a call
that returns a &Rc<dyn WindowAdapter> and use an Option variant for register/unregister component.
For the former, in the future, we want to create the adapter if it doesn't exist.
For the latter we don't want to do that.
This type is poorly implemented and not documented. Let's remove it for now.
It shall remain available in the git history in the event of a resurrection.
- move all the builtin function to handling to its own function with an
exhaustive match, so we get a compile error when we forgot to
implement one
- Let Globals know about the window because we need it to get the color
scheme
and use Rc<dyn PlatformWindow> instead. The alias has to stay with the ffi
functions though and the item vtable definitions,
because we don't have an Rc<> template in C++.
This avoid repeating the enums both in the compiler and in
the runtime library, and register them in a bunch of other places.
So it should be easier to add enums and enum values
Since cbindgen doesn't see through the macro, generate the enum
manually
- 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
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
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.
2022-01-31 16:00:50 +01:00
Renamed from sixtyfps_runtime/interpreter/eval_layout.rs (Browse further)