mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 20:31:27 +00:00
ContextMenu: show submenu on hover after a timeout
This means that the parent menu still get the mouse events Also add the ability to close the menu programmatically
This commit is contained in:
parent
feb7a864df
commit
c0b72cad2f
11 changed files with 125 additions and 35 deletions
|
|
@ -156,7 +156,7 @@ public:
|
|||
auto p = pos(popup);
|
||||
auto popup_dyn = popup.into_dyn();
|
||||
auto id = cbindgen_private::slint_windowrc_show_popup(&inner, &popup_dyn, p, close_policy,
|
||||
&parent_item);
|
||||
&parent_item, false);
|
||||
popup->user_init();
|
||||
return id;
|
||||
}
|
||||
|
|
@ -179,7 +179,7 @@ public:
|
|||
auto popup_dyn = popup.into_dyn();
|
||||
auto id = cbindgen_private::slint_windowrc_show_popup(
|
||||
&inner, &popup_dyn, pos, cbindgen_private::PopupClosePolicy::CloseOnClickOutside,
|
||||
&context_menu_rc);
|
||||
&context_menu_rc, true);
|
||||
popup->user_init();
|
||||
return id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue