mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
Add a clear-focus()
function on all elements that have a focus()
function
This is the counter-part, which removes focus from the element if it's currently focused. The window - if focused - may still be focused towards the windowing system.
This commit is contained in:
parent
e10e97c944
commit
31767eb6ab
21 changed files with 268 additions and 23 deletions
|
@ -93,10 +93,10 @@ public:
|
|||
items, &inner);
|
||||
}
|
||||
|
||||
void set_focus_item(const ItemTreeRc &component_rc, uint32_t item_index)
|
||||
void set_focus_item(const ItemTreeRc &component_rc, uint32_t item_index, bool set_focus)
|
||||
{
|
||||
cbindgen_private::ItemRc item_rc { component_rc, item_index };
|
||||
cbindgen_private::slint_windowrc_set_focus_item(&inner, &item_rc);
|
||||
cbindgen_private::slint_windowrc_set_focus_item(&inner, &item_rc, set_focus);
|
||||
}
|
||||
|
||||
template<typename Component>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue