mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 06:41:14 +00:00
docs: Modernize the tutorials for 1.0
This commit is contained in:
parent
59e0723793
commit
e64e15e277
21 changed files with 83 additions and 85 deletions
|
@ -27,17 +27,17 @@ fn main() {
|
|||
|
||||
// ANCHOR_END: tiles
|
||||
slint::slint! {
|
||||
struct TileData := {
|
||||
struct TileData {
|
||||
image: image,
|
||||
image_visible: bool,
|
||||
solved: bool,
|
||||
}
|
||||
|
||||
MemoryTile := Rectangle {
|
||||
component MemoryTile inherits Rectangle {
|
||||
callback clicked;
|
||||
property <bool> open_curtain;
|
||||
property <bool> solved;
|
||||
property <image> icon;
|
||||
in property <bool> open_curtain;
|
||||
in property <bool> solved;
|
||||
in property <image> icon;
|
||||
|
||||
height: 64px;
|
||||
width: 64px;
|
||||
|
@ -75,11 +75,12 @@ slint::slint! {
|
|||
}
|
||||
}
|
||||
}
|
||||
MainWindow := Window {
|
||||
|
||||
export component MainWindow inherits Window {
|
||||
width: 326px;
|
||||
height: 326px;
|
||||
|
||||
property <[TileData]> memory_tiles: [
|
||||
in-out property <[TileData]> memory_tiles: [
|
||||
{ image: @image-url("icons/at.png") },
|
||||
{ image: @image-url("icons/balance-scale.png") },
|
||||
{ image: @image-url("icons/bicycle.png") },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue