docs: Use it's, etc. more consistently (#2287)

This commit is contained in:
Tobias Hunger 2023-02-24 17:42:22 +01:00 committed by GitHub
parent 0bd99a17fa
commit 42d1fbdbcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 126 additions and 126 deletions

View file

@ -1,11 +1,11 @@
# Conclusion
In this tutorial, we have demonstrated how to combine some built-in Slint elements with C++ code to build a little
game. There are many more features that we have not talked about, such as layouts, widgets, or styling.
game. There are many more features that we haven't talked about, such as layouts, widgets, or styling.
We recommend the following links to continue:
* [Examples](https://github.com/slint-ui/slint/tree/master/examples): In the Slint repository we have collected a few demos and examples. These are a great starting point to learn how to use many Slint features.
* [Todo Example](https://github.com/slint-ui/slint/tree/master/examples/todo): This is one of the examples that implements a classic use-case.
* [Memory Puzzzle](https://github.com/slint-ui/slint/tree/master/examples/memory): This is a slightly more polished version of the code in this example. And you can <a href="https://slint-ui.com/demos/memory/" target="_blank">play the wasm version</a> in your browser.
* [Memory Puzzle](https://github.com/slint-ui/slint/tree/master/examples/memory): This is a slightly more polished version of the code in this example. And you can <a href="https://slint-ui.com/demos/memory/" target="_blank">play the wasm version</a> in your browser.
* [Slint API Docs](https://slint-ui.com/docs/cpp/): The reference documentation for the C++ library.

View file

@ -3,7 +3,7 @@
What we'll do is take the list of tiles declared in the .slint language, duplicate it, and shuffle it.
We'll do so by accessing the `memory_tiles` property through the C++ code. For each top-level property,
a getter and a setter function is generated - in our case `get_memory_tiles` and `set_memory_tiles`.
Since `memory_tiles` is an array in the `.slint` language, it is represented as a [`std::shared_ptr<slint::Model>`](https://slint-ui.com/docs/cpp/api/classslint_1_1model).
Since `memory_tiles` is an array in the `.slint` language, it's represented as a [`std::shared_ptr<slint::Model>`](https://slint-ui.com/docs/cpp/api/classslint_1_1model).
We can't modify the model generated by the .slint, but we can extract the tiles from it, and put it
in a [`slint::VectorModel`](https://slint-ui.com/docs/cpp/api/classslint_1_1vectormodel) which inherits from `Model`.
`VectorModel` allows us to make modifications and we can use it to replace the static generated model.

View file

@ -3,7 +3,7 @@
With the skeleton in place, let's look at the first element of the game, the memory tile. It will be the
visual building block that consists of an underlying filled rectangle background, the icon image. Later we'll add a
covering rectangle that acts as a curtain. The background rectangle is declared to be 64 logical pixels wide and tall,
and it is filled with a soothing tone of blue. Note how lengths in the `.slint` language have a unit, here
and it's filled with a soothing tone of blue. Note how lengths in the `.slint` language have a unit, here
the `px` suffix. That makes the code easier to read and the compiler can detect when your are accidentally
mixing values with different units attached to them.