slint/tests/cases/properties/border_radius.slint
Olivier Goffart 3e94bd2167 Janitor: Remove trailing whitespaces from all files
`git grep -I -l -O'sed -i "s/[[:space:]]*$//"' -e ''`
2025-01-10 13:23:22 +01:00

38 lines
905 B
Text

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
export component TestCase {
rect := Rectangle {
border-radius: 45px;
border-top-left-radius: 98px;
}
out property<bool> tl_ok: rect.border-top-left-radius == 98px;
out property<bool> tr_ok: rect.border-top-right-radius == 45px;
out property<bool> br_ok: rect.border-bottom-right-radius == 45px;
out property<bool> bl_ok: rect.border-bottom-left-radius == 45px;
out property<bool> test: tl_ok && tr_ok && br_ok && bl_ok;
}
/*
```cpp
auto handle = TestCase::create();
const TestCase &instance = *handle;
assert(instance.get_test());
```
```rust
let instance = TestCase::new().unwrap();
assert!(instance.get_test());
```
```js
var instance = new slint.TestCase({});
assert(instance.test);
```
*/