mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00
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:
parent
5f07678478
commit
567c644a5f
9 changed files with 61 additions and 32 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue