mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-27 20:42:25 +00:00
Update some .60 to .slint
This commit is contained in:
parent
d4c1130130
commit
03f78af987
4 changed files with 6 additions and 6 deletions
|
@ -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:
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue