1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
3
4// The presence of this component shouldn't break anything
5component Window {}
6
7Combo := Rectangle {
8 property <color> inner_color;
9 my_popup := PopupWindow {
10 Rectangle {
11 background: root.inner_color;
12 insidelayout := VerticalLayout {
13 spacing: 3px;
14 for aa in [1, 2]: Text { text: aa; }
15 }
16 }
17 }
18 TouchArea {
19 clicked => { my_popup.show(); }
20 }
21}
22
23TestCase := Rectangle {
24 for x in [1, 2] : Combo { }
25}
26
27ComplexTestCase := Rectangle {
28 TestCase {
29 cob := Combo {
30 PopupWindow {
31 width: root.width * 0.5;
32 height: parent.height;
33 x: 20px + cob.height;
34 }
35 }
36 }
37 TestCase { }
38}
39
40TypeConversionTestCase := Rectangle {
41 height: 400px;
42 popup := PopupWindow {
43 y: root.height / 2;
44 x: root.height + 155.52px;
45 }
46 TouchArea {
47 clicked => { popup.show() }
48 }
49}