mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +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:
@@ -68,6 +68,7 @@ InProcessWebView::InProcessWebView()
|
||||
{
|
||||
set_should_hide_unnecessary_scrollbars(true);
|
||||
set_background_role(ColorRole::Base);
|
||||
set_focus_policy(GUI::FocusPolicy::StrongFocus);
|
||||
|
||||
m_copy_action = GUI::CommonActions::make_copy_action([this](auto&) {
|
||||
GUI::Clipboard::the().set_plain_text(selected_text());
|
||||
|
||||
Reference in New Issue
Block a user