| 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 | export component TestCase { |
| 5 | tl_layout := HorizontalLayout { |
| 6 | if true: Rectangle { |
| 7 | l := Rectangle { |
| 8 | preferred-width: 320px; |
| 9 | preferred-height: 240px; |
| 10 | background: red; |
| 11 | } |
| 12 | Rectangle { |
| 13 | background: blue; |
| 14 | width <=> l.width; |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | out property<bool> test: tl_layout.preferred-width == 320px; |
| 20 | } |
| 21 |
