mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 22:31:14 +00:00
Janitor: Fix typos in comments and user-facing strings
Also adapt tests for error messages containing the fixed strings. No behavior change is intended!
This commit is contained in:
parent
4b12ed03cf
commit
13d7f5e7bd
96 changed files with 290 additions and 288 deletions
|
@ -18,7 +18,7 @@ SixtyFPS comes with a CMake integration that automates the compilation step of t
|
|||
offers a CMake target for convenient linkage.
|
||||
|
||||
*Note*: We recommend using the Ninja generator of CMake for the most efficient build and `.60` dependency tracking.
|
||||
You can select the CMake Ninja backend by passing `-GNinja` or settig the `CMAKE_GENERATOR` environment variable to `Ninja`.
|
||||
You can select the CMake Ninja backend by passing `-GNinja` or setting the `CMAKE_GENERATOR` environment variable to `Ninja`.
|
||||
|
||||
### Building from Sources
|
||||
|
||||
|
@ -125,7 +125,7 @@ necessary to link your executable or library against the `SixtyFPS::SixtyFPS` ta
|
|||
## Tutorial
|
||||
|
||||
Let's make a UI for a todo list application using the SixtyFPS UI description language.
|
||||
Hopefully this should be self explainatory. Check out the documentation of the language for help
|
||||
Hopefully this should be self explanatory. Check out the documentation of the language for help
|
||||
|
||||
```60
|
||||
// file: my_application_ui.60
|
||||
|
@ -181,9 +181,8 @@ sixtyfps_compiler my_application_ui.60 > my_application_ui.h
|
|||
Note: You would usually not type this command yourself, this is done automatically by the build system.
|
||||
(that's what the `sixtyfps_target_60_sources` cmake function does)
|
||||
|
||||
|
||||
This will generate a `my_application_ui.h` header file. It basically contains the following code
|
||||
(edited for briefty)
|
||||
(edited for brevity)
|
||||
|
||||
```C++
|
||||
#include <sixtyfps>
|
||||
|
|
|
@ -45,7 +45,7 @@ This will generate a header with the following contents (edited for documentatio
|
|||
|
||||
class SampleComponent {
|
||||
public:
|
||||
/// Contructor
|
||||
/// Constructor
|
||||
inline auto create () -> sixtyfps::ComponentHandle<MainWindow>;
|
||||
/// Destructor
|
||||
inline ~SampleComponent ();
|
||||
|
|
|
@ -13,8 +13,8 @@ The follow table summarizes the entire mapping:
|
|||
| `image` | [`sixtyfps::Image`](../api/structsixtyfps_1_1_image.html) | |
|
||||
| `physical_length` | `float` | The unit are physical pixels. |
|
||||
| `length` | `float` | At run-time, logical lengths are automatically translated to physical pixels using the device pixel ratio. |
|
||||
| `duration` | `std::int64_t` | At run-time, durations are always represented as signed 64-bit integers with milisecond precision. |
|
||||
| stucture | A `class` of the same name | The order of the data member are in the lexicographic order of their name |
|
||||
| `duration` | `std::int64_t` | At run-time, durations are always represented as signed 64-bit integers with millisecond precision. |
|
||||
| structure | A `class` of the same name | The order of the data member are in the lexicographic order of their name |
|
||||
|
||||
## Structures
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@ public:
|
|||
virtual ModelData row_data(int i) const = 0;
|
||||
/// Sets the data for a particular row. This function should be called with `row < row_count()`.
|
||||
/// If the model cannot support data changes, then it is ok to do nothing (default
|
||||
/// implementation). If the model can update the data, the implmentation should also call
|
||||
/// implementation). If the model can update the data, the implementation should also call
|
||||
/// row_changed.
|
||||
virtual void set_row_data(int, const ModelData &) {};
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
/// Returns the linear gradient's angle in degress.
|
||||
/// Returns the linear gradient's angle in degrees.
|
||||
float angle() const
|
||||
{
|
||||
// The gradient's first stop is a fake stop to store the angle
|
||||
|
|
|
@ -49,8 +49,8 @@ class Value;
|
|||
/// This type represents a runtime instance of structure in `.60`.
|
||||
///
|
||||
/// This can either be an instance of a name structure introduced
|
||||
/// with the `struct` keyword in the .60 file, or an annonymous struct
|
||||
/// writen with the `{ key: value, }` notation.
|
||||
/// with the `struct` keyword in the .60 file, or an anonymous struct
|
||||
/// written with the `{ key: value, }` notation.
|
||||
///
|
||||
/// It can be constructed with the range constructor or initializer lst,
|
||||
/// and converted into or from a Value with the Value constructor and
|
||||
|
@ -456,7 +456,7 @@ inline Value::Value(const std::shared_ptr<sixtyfps::Model<Value>> &model)
|
|||
{
|
||||
std::shared_ptr<sixtyfps::Model<Value>> model;
|
||||
cbindgen_private::ModelNotifyOpaque notify;
|
||||
// This kind of mean that the rust code has ownership of "this" until the drop funciton is
|
||||
// This kind of mean that the rust code has ownership of "this" until the drop function is
|
||||
// called
|
||||
std::shared_ptr<AbstractRepeaterView> self;
|
||||
~ModelWrapper() { cbindgen_private::sixtyfps_interpreter_model_notify_destructor(¬ify); }
|
||||
|
@ -872,7 +872,7 @@ public:
|
|||
///
|
||||
/// Returns the compiled `ComponentDefinition` if there were no errors.
|
||||
///
|
||||
/// Any diagnostics produced during the compilation, such as warnigns or errors, are collected
|
||||
/// Any diagnostics produced during the compilation, such as warnings or errors, are collected
|
||||
/// in this ComponentCompiler and can be retrieved after the call using the diagnostics()
|
||||
/// function.
|
||||
///
|
||||
|
|
|
@ -249,7 +249,7 @@ struct PropertyTracker
|
|||
bool is_dirty() const { return cbindgen_private::sixtyfps_property_tracker_is_dirty(&inner); }
|
||||
|
||||
/// Invokes the provided functor \a f and tracks accessed to any properties during that
|
||||
/// invokation.
|
||||
/// invocation.
|
||||
template<typename F>
|
||||
auto evaluate(const F &f) const -> std::enable_if_t<std::is_same_v<decltype(f()), void>>
|
||||
{
|
||||
|
@ -258,7 +258,7 @@ struct PropertyTracker
|
|||
}
|
||||
|
||||
/// Invokes the provided functor \a f and tracks accessed to any properties during that
|
||||
/// invokation. Use this overload if your functor returns a value, as evaluate() will pass it on
|
||||
/// invocation. Use this overload if your functor returns a value, as evaluate() will pass it on
|
||||
/// and return it.
|
||||
template<typename F>
|
||||
auto evaluate(const F &f) const
|
||||
|
@ -270,7 +270,7 @@ struct PropertyTracker
|
|||
}
|
||||
|
||||
/// Invokes the provided functor \a f and tracks accessed to any properties during that
|
||||
/// invokation.
|
||||
/// invocation.
|
||||
///
|
||||
/// This starts a new dependency chain and if called during the evaluation of another
|
||||
/// property tracker, the outer tracker will not be notified if any accessed properties change.
|
||||
|
@ -283,7 +283,7 @@ struct PropertyTracker
|
|||
}
|
||||
|
||||
/// Invokes the provided functor \a f and tracks accessed to any properties during that
|
||||
/// invokation. Use this overload if your functor returns a value, as evaluate() will pass it on
|
||||
/// invocation. Use this overload if your functor returns a value, as evaluate() will pass it on
|
||||
/// and return it.
|
||||
///
|
||||
/// This starts a new dependency chain and if called during the evaluation of another
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
This file is also available under commercial licensing terms.
|
||||
Please contact info@sixtyfps.io for more information.
|
||||
LICENSE END */
|
||||
/*! This scrates just expose the function used by the C++ integration */
|
||||
/*! This crate just expose the function used by the C++ integration */
|
||||
|
||||
use core::ffi::c_void;
|
||||
use sixtyfps_corelib::window::ffi::ComponentWindowOpaque;
|
||||
|
@ -38,7 +38,7 @@ pub unsafe extern "C" fn sixtyfps_run_event_loop() {
|
|||
.run_event_loop(sixtyfps_corelib::backend::EventLoopQuitBehavior::QuitOnLastWindowClosed);
|
||||
}
|
||||
|
||||
/// Will execute the fiven functor in the main thread
|
||||
/// Will execute the given functor in the main thread
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn sixtyfps_post_event(
|
||||
event: extern "C" fn(user_data: *mut c_void),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue