mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
PopupWindow: added close-policy property (#6614)
* Update api/cpp/include/slint_window.h Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update docs/reference/src/language/builtins/elements.md Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev> * Update internal/core/window.rs Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update internal/interpreter/eval.rs Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev> * Update internal/backends/qt/qt_window.rs Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update internal/interpreter/dynamic_item_tree.rs Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update internal/compiler/passes/materialize_fake_properties.rs Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
This commit is contained in:
parent
0bf924cf0d
commit
14c7910d49
33 changed files with 657 additions and 61 deletions
|
@ -106,13 +106,14 @@ public:
|
|||
}
|
||||
|
||||
template<typename Component, typename Parent, typename PosGetter>
|
||||
void show_popup(const Parent *parent_component, PosGetter pos, bool close_on_click,
|
||||
void show_popup(const Parent *parent_component, PosGetter pos,
|
||||
cbindgen_private::PopupClosePolicy close_policy,
|
||||
cbindgen_private::ItemRc parent_item) const
|
||||
{
|
||||
auto popup = Component::create(parent_component);
|
||||
cbindgen_private::Point p = pos(popup);
|
||||
auto popup_dyn = popup.into_dyn();
|
||||
cbindgen_private::slint_windowrc_show_popup(&inner, &popup_dyn, p, close_on_click,
|
||||
cbindgen_private::slint_windowrc_show_popup(&inner, &popup_dyn, p, close_policy,
|
||||
&parent_item);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue