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
5import { TabWidget } from "std-widgets.slint";
6
7TestCase := Window {
8 preferred_height: 500px;
9 preferred_width: 500px;
10
11 property <int> current_tab: tw.current-index;
12
13 VerticalLayout {
14 padding: 20px;
15 tw := TabWidget {
16 current-index: 1;
17 Tab {
18 title: "Hello";
19 Rectangle {
20 background: #8555;
21 }
22
23 }
24 Tab {
25 title: "World";
26 Text { text: "This is the second widget"; }
27 }
28 Tab {
29 title: "Third";
30 Rectangle {
31 background: pink;
32 }
33 min_height: 200px;
34 }
35 }
36 }
37
38 property <bool> test: tw.vertical_stretch == 1 && tw.horizontal_stretch == 1 && tw.min_height > 200px && current-tab == 1;
39}
40}
41