1 | #![allow (deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/examples"# ] |
2 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
3 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial |
4 | |
5 | Comp := Rectangle { |
6 | Rectangle { |
7 | width: 5%; |
8 | height: 5%; |
9 | background: white; |
10 | opacity: 1; |
11 | } |
12 | } |
13 | |
14 | |
15 | TestCase := Window { |
16 | width: 800px; |
17 | height: 600px; |
18 | background: green; |
19 | |
20 | Rectangle { |
21 | background: red; |
22 | width: 50%; |
23 | height: 50%; |
24 | opacity: 0.5; |
25 | } |
26 | |
27 | Comp { |
28 | background: blue; |
29 | x: parent.width / 4; |
30 | y: parent.height / 4; |
31 | width: 50%; |
32 | height: 50%; |
33 | opacity: 0.5; |
34 | Rectangle { |
35 | width: 10%; |
36 | height: 10%; |
37 | background: yellow; |
38 | } |
39 | } |
40 | |
41 | for i in 3 : Rectangle { |
42 | background: black; |
43 | width: 10%; |
44 | height: 10%; |
45 | opacity: 0.2 * (i + 1); |
46 | y: parent.height / 3; |
47 | x: parent.width / 4 * i; |
48 | } |
49 | |
50 | |
51 | } |
52 | } |
53 | |