| 1 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
| 2 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 |
| 3 | |
| 4 | Button := Text { } |
| 5 | |
| 6 | PanelButton := HorizontalLayout { |
| 7 | property<string> button-text <=> button.text; |
| 8 | button := Button { } |
| 9 | } |
| 10 | |
| 11 | TestCase := Window { |
| 12 | property <bool> test: pb.preferred-height == control.preferred-height; |
| 13 | pb := PanelButton { button-text: "button1" ; } |
| 14 | control := Text { text: "button1" ; } |
| 15 | } |
| 16 | |
| 17 | |
| 18 | /* |
| 19 | |
| 20 | ```rust |
| 21 | let ui = TestCase::new().unwrap(); |
| 22 | assert!(ui.get_test()); |
| 23 | ``` |
| 24 | |
| 25 | */ |
| 26 | |