Skip to content

Commit 205c8a1

Browse files
metmoawesomekling
authored andcommitted
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.
1 parent 432a34a commit 205c8a1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Userland/Applications/ThemeEditor/PreviewWidget.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ class MiniWidgetGallery final : public GUI::Widget {
4949
m_statusbar->set_text("Status bar");
5050
m_editor = add<GUI::TextEditor>();
5151
m_editor->set_text("Text editor\nwith multiple\nlines.");
52+
53+
for_each_child_widget([](auto& child) {
54+
child.set_focus_policy(GUI::FocusPolicy::NoFocus);
55+
return IterationDecision::Continue;
56+
});
5257
}
5358

5459
virtual void resize_event(GUI::ResizeEvent&) override

0 commit comments

Comments
 (0)