slint
slint copied to clipboard
`visible` don't work as the root of a repeater
export Demo := Window {
width: 300px; height: 300px;
if true : Rectangle {
background: blue;
visible: false;
}
}
In that example, the Rectangle is still visible despite the visible: false
The idea is that visible
is implemented with an empty clip. However, for a repeater, we call object_tree::inject_element_as_repeated_element
which itself call adjust_geometry_for_injected_parent
to set the width/height but it shouldn't do that for the visibility element (it should do it for the drop shadow tough)