Fix PopupWindow position when all elements are not inlined

Pass a reference to the parent item in the show_popup function
so we can compute the exact location at runtime.
This commit is contained in:
Olivier Goffart 2021-10-19 14:32:54 +02:00 committed by Simon Hausmann
parent 5f07678478
commit 567c644a5f
9 changed files with 61 additions and 32 deletions

View file

@ -139,10 +139,11 @@ public:
}
template<typename Component, typename Parent>
void show_popup(const Parent *parent_component, cbindgen_private::Point p) const
void show_popup(const Parent *parent_component, cbindgen_private::Point p,
cbindgen_private::ItemRc parent_item) const
{
auto popup = Component::create(parent_component).into_dyn();
cbindgen_private::sixtyfps_windowrc_show_popup(&inner, &popup, p);
cbindgen_private::sixtyfps_windowrc_show_popup(&inner, &popup, p, &parent_item);
}
private: