diff options
author | Andreas Kling <kling@serenityos.org> | 2021-10-23 14:58:45 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-23 16:10:44 +0200 |
commit | 79f2e8ae2a9ed276b4ff6bb80e1ed3bdfebb27c0 (patch) | |
tree | e07ad942bf6c6d6d084928b854b54511218a2065 /Userland/Libraries/LibGUI/ToolbarContainer.h | |
parent | 0d8373287ccc01089f558a33d9150281fd63a8a8 (diff) | |
download | serenity-79f2e8ae2a9ed276b4ff6bb80e1ed3bdfebb27c0.zip |
LibGUI: Make exclusive button group act as a single focusable unit
Before this change, using the Tab key would cycle through all the
individual buttons in an exclusive group (e.g radio buttons.)
This felt wrong, since a group of exclusive buttons is really a single
logical input with a limited number of possible choices.
This patch makes such groups behave as a single focusable unit instead,
by dynamically updating the focus policies so that only the currently
checked button is focusable.
We also allow keyboard navigation within the button group via the arrow
keys. This had to be specialized in GUI::AbstractButton, since the
default behavior of arrow keys is to traverse the focus chain.
Diffstat (limited to 'Userland/Libraries/LibGUI/ToolbarContainer.h')
0 files changed, 0 insertions, 0 deletions