This commit is contained in:
omahs 2025-05-12 13:03:59 +02:00 committed by GitHub
parent d28391e332
commit 74232eae8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 39 additions and 39 deletions

View file

@ -63,7 +63,7 @@ jobs:
git commit -a -m 'Update Translations: extract strings'
- name: Result
# Only run this if there was a diff!
run: if [ '${{ steps.git_diff.outcome }}' = 'failure' ]; then echo "I commited this change to git:"; git show ; else echo "This change was ignored:" ; git diff HEAD ; fi
run: if [ '${{ steps.git_diff.outcome }}' = 'failure' ]; then echo "I committed this change to git:"; git show ; else echo "This change was ignored:" ; git diff HEAD ; fi
- name: Push changes
uses: ad-m/github-push-action@master
with:

View file

@ -54,12 +54,12 @@ All notable changes to this project are documented in this file.
- Added `float.to-fixed()` and `float.to-precision()`.
- Added `string.to-lowercase()` and `string.to-uppercase()`.
- Fixed change handler on a aliased property. (#7784, #7747)
- Fixed change handler on an aliased property. (#7784, #7747)
- Fixed compiler panic when one branch of the `if` statement is not a void expression. (#7864)
- Fixed `@children` as sibling to `Timer` or `PopupWindow`. (#7887)
- Deprecated alias to global callbacks and make it an error when setting it, instead of a panic. (#7806)
- Conditional element no longer re-instantiates if the condition gets dirty without changing. (#3953)
- Fixed crash if a component get destroyed when a funciton or callback of it is running. (#7880)
- Fixed crash if a component get destroyed when a function or callback of it is running. (#7880)
- `Color.hsv()`: The hue value now wraps instead of clamping between 0 and 360. e.g. a hue of `480` would wrap as expected to `120`.
Previously any value equal or greater than 360 would cause the function to output pure black. In the unlikely case an app relied
on this keep an eye out as a color will now show up instead of black.
@ -182,7 +182,7 @@ All notable changes to this project are documented in this file.
### Slint Language
- Added `AccessibleRole::tab-panel` and fixed accessibility on `TabWidget` (#7270)
- Added `AccessibleRole::groupbox` and fixed accessibility on on `GroupBox`
- Added `AccessibleRole::groupbox` and fixed accessibility on `GroupBox`
- Better error recovery when element name is missing.
- Added warning when a type name overwrites another.
- Added `Path::anti-alias` property.
@ -1650,7 +1650,7 @@ as well as the [Rust migration guide for the `sixtyfps` crate](api/rs/slint/migr
- `Slider` now has a `changed` callback.
- Added `TabWidget` widget.
- Rust: `sixtyfps::Image` can now be constructed from image data provided by `sixtyfps::SharedPixelBuffer`.
This enables integrating with other low-level software rendering or the the popular Rust image crate.
This enables integrating with other low-level software rendering or the popular Rust image crate.
- VSCode extension: added an option to specify command line arguments for the LSP.
### Fixed

View file

@ -29,6 +29,6 @@ When opening a pull request, you will be asked to sign a
## Coding Style
For the Rust portion of the code base, the CI enforce the coding style via rustfmt.
For the C++ portion of the code base, the CI enforce the coding style via `clang-format`.
For the Rust portion of the code base, the CI enforces the coding style via rustfmt.
For the C++ portion of the code base, the CI enforces the coding style via `clang-format`.

View file

@ -50,7 +50,7 @@ namespace platform {
/// Internal interface for a renderer for use with the WindowAdapter.
///
/// This class is not intended to be re-implemented. In places where this class is required, use
/// of one the existing implementations such as SoftwareRenderer or SkiaRenderer.
/// one of the existing implementations such as SoftwareRenderer or SkiaRenderer.
class AbstractRenderer
{
private:
@ -201,7 +201,7 @@ public:
///
/// The default implementation does nothing
///
/// This function should sent the size to the Windowing system. If the window size actually
/// This function should send the size to the Windowing system. If the window size actually
/// changes, you should call slint::Window::dispatch_resize_event to propagate the new size
/// to the slint view.
virtual void set_size(slint::PhysicalSize) { }
@ -282,7 +282,7 @@ public:
/// should not be able to be resized larger than this size. If it is left unset, there
/// is no maximum size.
std::optional<LogicalSize> max;
/// This represents the preferred size of the window. This is the size the window
/// This represents the preferred size of the window. This is the size of the window
/// should have by default
LogicalSize preferred;
};
@ -403,7 +403,7 @@ public:
/// or re-enter from the event loop
virtual void quit_event_loop() { }
/// An task that is passed to the Platform::run_in_event_loop function and needs to be
/// A task that is passed to the Platform::run_in_event_loop function and needs to be
/// run in the event loop and not in any other thread.
class Task
{
@ -449,7 +449,7 @@ public:
/// This function is called by slint::invoke_from_event_loop().
/// It can be called from any thread, but the passed function must only be called
/// from the event loop.
/// Reimplements this function and move the event to the event loop before calling
/// Reimplements this function and moves the event to the event loop before calling
/// Task::run()
virtual void run_in_event_loop(Task) { }
};
@ -668,7 +668,7 @@ public:
/// delegated. Use this to implement support for hardware accelerators such as DMA2D, PPA, or
/// PXP on Microcontrollers.
///
/// **Note**: This class is still experimental - it's API is subject to changes and not
/// **Note**: This class is still experimental - its API is subject to changes and not
/// stabilized yet. To use the class, you must enable the `SLINT_FEATURE_EXPERIMENTAL=ON` CMake
/// option.
template<typename PixelType>
@ -825,7 +825,7 @@ public:
# ifdef SLINT_FEATURE_EXPERIMENTAL
/// Renders into the given TargetPixelBuffer.
///
/// **Note**: This class is still experimental - it's API is subject to changes and not
/// **Note**: This class is still experimental - its API is subject to changes and not
/// stabilized yet. To use the class, you must enable the `SLINT_FEATURE_EXPERIMENTAL=ON` CMake
/// option.
PhysicalRegion render(TargetPixelBuffer<Rgb8Pixel> *buffer) const
@ -837,7 +837,7 @@ public:
/// Renders into the given TargetPixelBuffer.
///
/// **Note**: This class is still experimental - it's API is subject to changes and not
/// **Note**: This class is still experimental - its API is subject to changes and not
/// stabilized yet. To use the class, you must enable the `SLINT_FEATURE_EXPERIMENTAL=ON` CMake
/// option.
PhysicalRegion render(TargetPixelBuffer<Rgb565Pixel> *buffer) const
@ -861,7 +861,7 @@ public:
Rotate270 = 270,
};
/// Set how the window need to be rotated in the buffer.
/// Set how the window needs to be rotated in the buffer.
///
/// This is typically used to implement screen rotation in software
void set_rendering_rotation(RenderingRotation rotation)

View file

@ -13,7 +13,7 @@
/// Use the functions and classes in this namespace for in-process UI testing.
///
/// This module is still experimental - it's API is subject to changes and not stabilized yet. To
/// This module is still experimental - its API is subject to changes and not stabilized yet. To
/// use the module, you must enable the `SLINT_FEATURE_EXPERIMENTAL=ON` and `SLINT_FEATURE_TESTING`
/// CMake options.
namespace slint::testing {
@ -36,7 +36,7 @@ class ElementHandle
explicit ElementHandle(const cbindgen_private::ElementHandle *inner) : inner(*inner) { }
public:
/// Visits visible elements within a component and call the visitor for each of them.
/// Visits visible elements within a component and calls the visitor for each of them.
///
/// The visitor must be a callable object that accepts an `ElementHandle` and returns either
/// `void`, or a type that can be converted to `bool`.
@ -44,7 +44,7 @@ public:
/// visited.
/// - If the visitor returns a type that can be converted to `bool`, the visitation continues as
/// long as the conversion result is false; otherwise, it stops, returning that value.
/// If the visitor never returns something that convertts to true, then the function returns a
/// If the visitor never returns something that converts to true, then the function returns a
/// default constructed value;
///
/// ```cpp

View file

@ -10,7 +10,7 @@
## 🚀 Project Structure
The documentation site is built with [Astro Starlight](https://starlight.astro.build/) and reuses it's
The documentation site is built with [Astro Starlight](https://starlight.astro.build/) and reuses its
project structure.
```

View file

@ -45,14 +45,14 @@ As the name suggests, Reactivity is all about parts of the user interface automa
to changes. The above example looks simple, but when run it does several things:
- The `Rectangle` will follow the mouse around as you move it.
- If you `click` anywhere the `Rectangle` will change color.
- If you `click` anywhere the `Rectangle` will change color.
- The `Text` elements will update their text to show the current position of the `Rectangle`.
The 'magic' here is built into the Slint language directly. There is no need to opt into this or define
specific stateful items. The `Rectangle` will automatically updates because it's `x` and `y` properties
specific stateful items. The `Rectangle` will automatically update because its `x` and `y` properties
are bound to the `mouse-x` and `mouse-y` properties of the `TouchArea` element. This was done by giving
the `TouchArea` a name to identify it `ta` and then using the name in what Slint calls an `expression`
to track values. Its as simples as `x: ta.mouse-x;` and `y: ta.mouse-y;`. The mouse-x and mouse-y properties
to track values. It's as simple as `x: ta.mouse-x;` and `y: ta.mouse-y;`. The mouse-x and mouse-y properties
are built into the `TouchArea` and automatically update as the cursor moves over them.
The `TouchArea` also has a `pressed` property that is only `true` when the cursor is pressed or clicked down.

View file

@ -53,7 +53,7 @@ When disabled, the `Menu` can be selected but not activated.
## `MenuItem`
A `MenuItem` represents a single menu entry. It's must be a child of a `Menu` element.
A `MenuItem` represents a single menu entry. It must be a child of a `Menu` element.
### Properties of `MenuItem`

View file

@ -174,7 +174,7 @@ cpp! {{
// This confuses Slint, so eat this event.
//
// One example is a popup is shown in the close event that
// then ignores the the close request to ask the user what to
// then ignores the close request to ask the user what to
// do. The stray release event will then close the popup
// straight away
//

View file

@ -546,7 +546,7 @@ impl ElementType {
if !tr.expose_internal_types
&& matches!(&t, Self::Builtin(e) if e.is_internal)
{
format!("Unknown element '{name}'. (The type exist as an internal type, but cannot be accessed in this scope)")
format!("Unknown element '{name}'. (The type exists as an internal type, but cannot be accessed in this scope)")
} else {
return Ok(t);
}
@ -564,7 +564,7 @@ impl ElementType {
}
_ => tr.lookup_element(name).and_then(|t| {
if !tr.expose_internal_types && matches!(&t, Self::Builtin(e) if e.is_internal) {
Err(format!("Unknown element '{name}'. (The type exist as an internal type, but cannot be accessed in this scope)"))
Err(format!("Unknown element '{name}'. (The type exists as an internal type, but cannot be accessed in this scope)"))
} else {
Ok(t)
}
@ -704,7 +704,7 @@ pub struct BuiltinElement {
pub name: SmolStr,
pub native_class: Rc<NativeClass>,
pub properties: BTreeMap<SmolStr, BuiltinPropertyInfo>,
/// Additional builtin element that can be accpeted as child of this element
/// Additional builtin element that can be accepted as child of this element
/// (example `Tab` in `TabWidget`, `Row` in `GridLayout` and the path elements in `Path`)
pub additional_accepted_child_types: HashMap<SmolStr, Rc<BuiltinElement>>,
/// `Self` is conceptually in `additional_accepted_child_types` (which it can't otherwise that'd make a Rc loop)
@ -731,7 +731,7 @@ pub struct PropertyLookupResult<'a> {
pub property_type: Type,
pub property_visibility: PropertyVisibility,
pub declared_pure: Option<bool>,
/// True if the property is part of the the current component (for visibility purposes)
/// True if the property is part of the current component (for visibility purposes)
pub is_local_to_component: bool,
/// True if the property in the direct base of the component (for visibility purposes)
pub is_in_direct_base: bool,

View file

@ -48,9 +48,9 @@ export SuperSimple := Rectangle {
}
NativeLineEdit { }
// ^error{Unknown element 'NativeLineEdit'. \(The type exist as an internal type, but cannot be accessed in this scope\)}
// ^error{Unknown element 'NativeLineEdit'. \(The type exists as an internal type, but cannot be accessed in this scope\)}
Opacity { }
// ^error{Unknown element 'Opacity'. \(The type exist as an internal type, but cannot be accessed in this scope\)}
// ^error{Unknown element 'Opacity'. \(The type exists as an internal type, but cannot be accessed in this scope\)}
}

View file

@ -3,9 +3,9 @@
export Test3 := Rectangle {
TabWidget {
// ^error{Unknown element 'TabWidget'. \(The type exist as an internal type, but cannot be accessed in this scope\)}
// ^error{Unknown element 'TabWidget'. \(The type exists as an internal type, but cannot be accessed in this scope\)}
}
}
export Foo := TabWidget { }
// ^error{Unknown element 'TabWidget'. \(The type exist as an internal type, but cannot be accessed in this scope\)}
// ^error{Unknown element 'TabWidget'. \(The type exists as an internal type, but cannot be accessed in this scope\)}

View file

@ -358,13 +358,13 @@ impl TypeRegister {
/// Insert a type into the type register with its builtin type name.
///
/// Returns false if a it replaced an existing type.
/// Returns false if it replaced an existing type.
pub fn insert_type(&mut self, t: Type) -> bool {
self.types.insert(t.to_smolstr(), t).is_none()
}
/// Insert a type into the type register with a specified name.
///
/// Returns false if a it replaced an existing type.
/// Returns false if it replaced an existing type.
pub fn insert_type_with_name(&mut self, t: Type, name: SmolStr) -> bool {
self.types.insert(name, t).is_none()
}
@ -622,7 +622,7 @@ impl TypeRegister {
self.lookup(qualified[0].as_ref())
}
/// Add the component with it's defined name
/// Add the component with its defined name
///
/// Returns false if there was already an element with the same name
pub fn add(&mut self, comp: Rc<Component>) -> bool {

View file

@ -99,7 +99,7 @@ impl From<LangType> for ValueType {
#[repr(u8)]
pub enum Value {
/// There is nothing in this value. That's the default.
/// For example, a function that do not return a result would return a Value::Void
/// For example, a function that does not return a result would return a Value::Void
#[default]
Void = 0,
/// An `int` or a `float` (this is also used for unit based type such as `length` or `angle`)
@ -1209,7 +1209,7 @@ pub fn print_diagnostics(diagnostics: &[Diagnostic]) {
build_diagnostics.print();
}
/// This represent an instance of a dynamic component
/// This represents an instance of a dynamic component
///
/// You can create an instance with the [`ComponentDefinition::create`] function.
///
@ -1516,7 +1516,7 @@ impl ComponentInstance {
)
}
/// Find the the `element` that was defined at the text position.
/// Find the `element` that was defined at the text position.
///
/// WARNING: this is not part of the public API
#[cfg(feature = "internal-highlight")]