mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 06:41:14 +00:00

Because the `bindings` field is taken in order not to keep the Element borrowed. Fixes original report from #553
42 lines
1,018 B
Text
42 lines
1,018 B
Text
/* LICENSE BEGIN
|
|
This file is part of the SixtyFPS Project -- https://sixtyfps.io
|
|
Copyright (c) 2021 Olivier Goffart <olivier.goffart@sixtyfps.io>
|
|
Copyright (c) 2021 Simon Hausmann <simon.hausmann@sixtyfps.io>
|
|
|
|
SPDX-License-Identifier: GPL-3.0-only
|
|
This file is also available under commercial licensing terms.
|
|
Please contact info@sixtyfps.io for more information.
|
|
LICENSE END */
|
|
// Test the propagation of maximum and minimum size through nested grid layouts
|
|
|
|
TestCase := Rectangle {
|
|
min-width: 500px;
|
|
max-width: min-width;
|
|
|
|
property xxx <=> preferred-height;
|
|
HorizontalLayout {
|
|
Rectangle { height: 88px; }
|
|
}
|
|
|
|
property <bool> test: min-width == 500px && max-width == 500px && xxx == 88px;
|
|
}
|
|
|
|
/*
|
|
```cpp
|
|
auto handle = TestCase::create();
|
|
const TestCase &instance = *handle;
|
|
assert(instance.get_test());
|
|
```
|
|
|
|
```rust
|
|
let instance = TestCase::new();
|
|
assert!(instance.get_test());
|
|
```
|
|
|
|
```js
|
|
var instance = new sixtyfps.TestCase({});
|
|
assert(instance.test);
|
|
```
|
|
*/
|
|
|
|
|