mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
parent
52d750999b
commit
8e8c6ab690
2 changed files with 40 additions and 0 deletions
|
@ -247,6 +247,10 @@ fn init_fake_property(
|
|||
&& !grid_layout_element.borrow().bindings.contains_key(name)
|
||||
{
|
||||
if let Some(e) = lazy_default() {
|
||||
if e.name == name && Rc::ptr_eq(&e.element.upgrade().unwrap(), grid_layout_element) {
|
||||
// Don't reference self
|
||||
return;
|
||||
}
|
||||
grid_layout_element
|
||||
.borrow_mut()
|
||||
.bindings
|
||||
|
|
36
tests/cases/layout/issue_140.60
Normal file
36
tests/cases/layout/issue_140.60
Normal file
|
@ -0,0 +1,36 @@
|
|||
/* LICENSE BEGIN
|
||||
This file is part of the SixtyFPS Project -- https://sixtyfps.io
|
||||
Copyright (c) 2020 Olivier Goffart <olivier.goffart@sixtyfps.io>
|
||||
Copyright (c) 2020 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 */
|
||||
|
||||
HelloWorld := Window {
|
||||
HorizontalLayout {
|
||||
VerticalLayout {
|
||||
HorizontalLayout {
|
||||
height: 50%;
|
||||
Rectangle {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
```cpp
|
||||
auto handle = HelloWorld::create();
|
||||
const HelloWorld &instance = *handle;
|
||||
HelloWorld::apply_layout({&HelloWorld::static_vtable, const_cast<HelloWorld*>(&instance) }, sixtyfps::Rect{0, 0, 300, 300});
|
||||
```
|
||||
|
||||
|
||||
```rust
|
||||
let instance = HelloWorld::new();
|
||||
sixtyfps::testing::apply_layout(&instance, sixtyfps::re_exports::Rect::new(Default::default(), sixtyfps::re_exports::Size::new(300., 300.)));
|
||||
```
|
||||
|
||||
*/
|
Loading…
Add table
Add a link
Reference in a new issue