mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +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
|
@ -3806,7 +3806,7 @@ fn compile_builtin_function_call(
|
|||
{fw_activated}
|
||||
}}")
|
||||
};
|
||||
format!("{window}.show_popup_menu<{popup_id}>({globals}, {position}, {{ {context_menu_rc} }}, [self](auto popup_menu) {{ {init} }})", globals = ctx.generator_state.global_access)
|
||||
format!("{window}.close_popup({context_menu}.popup_id); {context_menu}.popup_id = {window}.show_popup_menu<{popup_id}>({globals}, {position}, {{ {context_menu_rc} }}, [self](auto popup_menu) {{ {init} }})", globals = ctx.generator_state.global_access)
|
||||
}
|
||||
BuiltinFunction::SetSelectionOffsets => {
|
||||
if let [llr::Expression::PropertyReference(pr), from, to] = arguments {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue