mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 09:35:15 +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:
@@ -33,6 +33,7 @@ namespace HackStudio {
|
||||
|
||||
FormWidget::FormWidget()
|
||||
{
|
||||
set_focus_policy(GUI::FocusPolicy::StrongFocus);
|
||||
set_fill_with_background_color(true);
|
||||
set_relative_rect(5, 5, 400, 300);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user