mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-28 12:54:45 +00:00
Access the properties in the parent component of a repeated element
This required some refactoring of the EvaluationContext structure to include the parent context
This commit is contained in:
parent
53e61629ca
commit
f8b7989c0b
16 changed files with 249 additions and 101 deletions
|
@ -72,6 +72,14 @@ constexpr inline ItemTreeNode<uint8_t> make_dyn_node(std::uintptr_t offset)
|
|||
|
||||
using internal::sixtyfps_visit_item_tree;
|
||||
|
||||
template<typename Component>
|
||||
EvaluationContext evaluation_context_for_root_component(Component *component) {
|
||||
return EvaluationContext{
|
||||
VRef<ComponentVTable> { &Component::component_type, component},
|
||||
nullptr,
|
||||
};
|
||||
}
|
||||
|
||||
// layouts:
|
||||
using internal::Slice;
|
||||
using internal::solve_grid_layout;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue