-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Tweak the tutorial #7967
base: master
Are you sure you want to change the base?
docs: Tweak the tutorial #7967
Conversation
In this step, you add a curtain-like cover that opens when clicked. Slint files have an implicit z order for drawing items. | ||
Each subsequent item is drawn above the previous one. So a `Rectangle` on line 10 would be underneath another declared later | ||
in the file on line 50. To give the impression of curtains that cover the image, | ||
declare two rectangles after the <span class="hljs-built_in">Image</span>, so that Slint draws them over the Image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍
@@ -48,7 +48,7 @@ in a <LangRefLink lang="nodejs" relpath="classes/ArrayModel">`slint.ArrayModel.h | |||
The code uses the `rand` dependency for the randomization. Add it to the `Cargo.toml` file using the `cargo` command. | |||
|
|||
```sh | |||
cargo add rand@0.8 | |||
cargo add rand |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue I see with removing the version is that when a new, source-incompatible version of Rand is released, the tutorial needs fixing (and we have to find out first). Is there a specific reason for removing the version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, its an older version now. Let me update and see if the code is still valid
The wording was quite confusing before. To talk about declaring items 'below' to then draw in 'above'. So the thinking here is that 'before' and 'after' is just for talking about the text in the file. Then 'above' and 'below' is just used when talking about how items are drawn? Maybe even remove the text and just show the slint snipet?