mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
Polish rust tutorial
This commit is contained in:
parent
7bf6c4826f
commit
a0d89c0346
6 changed files with 9 additions and 9 deletions
|
@ -7,7 +7,7 @@ and it is filled with a soothing tone of blue. Note how lengths in the `.slint`
|
|||
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.
|
||||
|
||||
We copy the following code inside of the `sixtyfps!` macro:
|
||||
We copy the following code inside of the `slint!` macro:
|
||||
|
||||
```slint
|
||||
{{#include main_memory_tile.rs:tile}}
|
||||
|
@ -15,7 +15,7 @@ We copy the following code inside of the `sixtyfps!` macro:
|
|||
|
||||
Inside the <span class="hljs-built_in">Rectangle</span> we place an <span class="hljs-built_in">Image</span> element that
|
||||
loads an icon with the <span class="hljs-built_in">@image-url()</span> macro.
|
||||
When using the `sixtyfps!` macro, the path is relative to the folder in which the Cargo.toml is located.
|
||||
When using the `slint!` macro, the path is relative to the folder in which the Cargo.toml is located.
|
||||
When using .slint files, it is relative to the folder of the .slint file containing it.
|
||||
This icon and others we're going to use later need to be installed first. You can download a
|
||||
[Zip archive](https://sixtyfps.io/blog/memory-game-tutorial/icons.zip) that we have prepared and extract it with the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue