ThemeEditor: Disable focus for demo widgets

Pressing tab would focus on the demo widgets instead of switching
between the combo box and color input field. Instead set the focus
policy to NoFocus for all the widgets.
This commit is contained in:
Marcus Nilsson 2021-07-16 23:15:20 +02:00 committed by Andreas Kling
commit 205c8a12ed
Notes: sideshowbarker 2024-07-18 08:53:53 +09:00

View file

@ -49,6 +49,11 @@ private:
m_statusbar->set_text("Status bar");
m_editor = add<GUI::TextEditor>();
m_editor->set_text("Text editor\nwith multiple\nlines.");
for_each_child_widget([](auto& child) {
child.set_focus_policy(GUI::FocusPolicy::NoFocus);
return IterationDecision::Continue;
});
}
virtual void resize_event(GUI::ResizeEvent&) override