Update some .60 to .slint

This commit is contained in:
Tobias Hunger 2022-02-02 17:28:09 +01:00
parent d4c1130130
commit 03f78af987
No known key found for this signature in database
GPG key ID: 60874021D2F23F91
4 changed files with 6 additions and 6 deletions

View file

@ -43,7 +43,7 @@ if (value.has_value()) {
#### Callbacks
Callbacks declared in `.60` markup can be invoked from C++ using {cpp:func}`slint::interpreter::ComponentInstance::invoke_callback()` or {cpp:func}`slint::interpreter::ComponentInstance::invoke_global_callback()`. The arguments to the callback at invocation time used to require the use of `sixtyfps::Slice` type. This was changed to use the C++ 20 [`std::span`](https://en.cppreference.com/w/cpp/container/span) type, for easier passing.
Callbacks declared in `.slint` markup can be invoked from C++ using {cpp:func}`slint::interpreter::ComponentInstance::invoke_callback()` or {cpp:func}`slint::interpreter::ComponentInstance::invoke_global_callback()`. The arguments to the callback at invocation time used to require the use of `sixtyfps::Slice` type. This was changed to use the C++ 20 [`std::span`](https://en.cppreference.com/w/cpp/container/span) type, for easier passing.
Old code:

View file

@ -85,7 +85,7 @@ DashboardBuilder::build(slint::interpreter::ComponentCompiler &compiler) const
}
if (widget_imports.size() > 0) {
widget_imports = fmt::format("import {{ {} }} from \"iot-dashboard.60\";", widget_imports);
widget_imports = fmt::format("import {{ {} }} from \"iot-dashboard.slint\";", widget_imports);
}
// Vector of name/type_name of properties forwarded through the MainContent {} element.

View file

@ -10,7 +10,7 @@ it needs to be kept in sync with different place.
- It needs to be changed in this module
- the Widget list in lib.rs
- In the compiler: builtins.60
- In the compiler: builtins.slint
- For the C++ code (new item only): the build.rs to export the new item, and the `using` declaration in slint.h
- Don't forget to update the documentation
*/

View file

@ -11,7 +11,7 @@ use crate::langtype::Type;
use crate::object_tree::Component;
use std::rc::Rc;
/// Ideally we would be able to write this in builtins.slint, but the StyleMetrics is not available there
/// Ideally we would be able to write this in builtin.slint, but the StyleMetrics is not available there
pub fn apply_default_properties_from_style(
root_component: &Rc<Component>,
style_metrics: &Rc<Component>,