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

@ -12,7 +12,7 @@ If you are building Slint from source, you need to make sure that your Rust inst
### CMakeLists.txt ### CMakeLists.txt
- When using `FetchContent`, the `SOURCE_SUBDIR` has changed from `api/sixtyfps-cpp` to `api/cpp` - When using `FetchContent`, the `SOURCE_SUBDIR` has changed from `api/sixtyfps-cpp` to `api/cpp`
### Models ### Models
@ -43,7 +43,7 @@ if (value.has_value()) {
#### Callbacks #### 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: Old code:
@ -70,4 +70,4 @@ The CMake interface has changed mostly in terms of renaming `SixtyFPS` to `Slint
* `find_package(SixtyFPS)` becomes `find_package(Slint)`. * `find_package(SixtyFPS)` becomes `find_package(Slint)`.
* The `SixtyFPS::SixtyFPS` CMake target was renamed to `Slint::Slint`. * The `SixtyFPS::SixtyFPS` CMake target was renamed to `Slint::Slint`.
* The `sixtyfps_target_60_sources` CMake command was renamed to `slint_target_sources`. * The `sixtyfps_target_60_sources` CMake command was renamed to `slint_target_sources`.

View file

@ -85,7 +85,7 @@ DashboardBuilder::build(slint::interpreter::ComponentCompiler &compiler) const
} }
if (widget_imports.size() > 0) { 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. // 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 - It needs to be changed in this module
- the Widget list in lib.rs - 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 - 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 - Don't forget to update the documentation
*/ */

View file

@ -11,7 +11,7 @@ use crate::langtype::Type;
use crate::object_tree::Component; use crate::object_tree::Component;
use std::rc::Rc; 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( pub fn apply_default_properties_from_style(
root_component: &Rc<Component>, root_component: &Rc<Component>,
style_metrics: &Rc<Component>, style_metrics: &Rc<Component>,