1#![allow(deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/elements"#]
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// The presence of this component shouldn't break anything
6component Window {}
7
8Combo := Rectangle {
9 property <color> inner_color;
10 my_popup := PopupWindow {
11 Rectangle {
12 background: root.inner_color;
13 insidelayout := VerticalLayout {
14 spacing: 3px;
15 for aa in [1, 2]: Text { text: aa; }
16 }
17 }
18 }
19 TouchArea {
20 clicked => { my_popup.show(); }
21 }
22}
23
24TestCase := Rectangle {
25 for x in [1, 2] : Combo { }
26}
27
28ComplexTestCase := Rectangle {
29 TestCase {
30 cob := Combo {
31 PopupWindow {
32 width: root.width * 0.5;
33 height: parent.height;
34 x: 20px + cob.height;
35 }
36 }
37 }
38 TestCase { }
39}
40
41TypeConversionTestCase := Rectangle {
42 height: 400px;
43 popup := PopupWindow {
44 y: root.height / 2;
45 x: root.height + 155.52px;
46 }
47 TouchArea {
48 clicked => { popup.show() }
49 }
50}}
51