mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibGUI: Add Widget focus policies
Every widget now has a GUI::FocusPolicy that determines how it can receive focus: - NoFocus: The widget is not focusable (default) - TabFocus: The widget can be focused using the tab key. - ClickFocus: The widget can be focused by clicking on it. - StrongFocus: Both of the above. For widgets that have a focus proxy, getting/setting the focus policy will affect the proxy instead.
This commit is contained in:
parent
34014fa838
commit
aef56159a8
Notes:
sideshowbarker
2024-07-19 01:38:37 +09:00
Author: https://github.com/awesomekling
Commit: aef56159a8
32 changed files with 64 additions and 40 deletions
|
@ -64,6 +64,7 @@ void ToolBar::add_action(Action& action)
|
|||
button.set_exclusive(true);
|
||||
button.set_action(*item->action);
|
||||
button.set_tooltip(item->action->text());
|
||||
button.set_focus_policy(FocusPolicy::TabFocus);
|
||||
if (item->action->icon())
|
||||
button.set_icon(item->action->icon());
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue