mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-18 03:13:34 +00:00
docs: Tweak the tutorial (#7967)
This commit is contained in:
parent
5760c1f168
commit
bd093b5119
1 changed files with 4 additions and 2 deletions
|
|
@ -7,8 +7,10 @@ description: Polishing the Tile
|
||||||
import { Code } from '@astrojs/starlight/components';
|
import { Code } from '@astrojs/starlight/components';
|
||||||
import { extractLines } from '/src/utils/utils.ts';
|
import { extractLines } from '/src/utils/utils.ts';
|
||||||
|
|
||||||
In this step, you add a curtain-like cover that opens when clicked. You do this by declaring two rectangles
|
In this step, you add a curtain-like cover that opens when clicked. Slint files have an implicit z order for drawing items.
|
||||||
below the <span class="hljs-built_in">Image</span>, so that Slint draws them after the Image and thus on top of the image.
|
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.
|
||||||
|
|
||||||
The <span class="hljs-built_in">TouchArea</span> element declares a transparent rectangular region that allows
|
The <span class="hljs-built_in">TouchArea</span> element declares a transparent rectangular region that allows
|
||||||
reacting to user input such as a mouse click or tap. The element forwards a callback to the <em>MainWindow</em> indicating that a user clicked the tile.
|
reacting to user input such as a mouse click or tap. The element forwards a callback to the <em>MainWindow</em> indicating that a user clicked the tile.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue