Make Checkbox take focus when clicked (#810)

This commit is contained in:
rio 2024-01-17 11:21:32 -06:00 committed by GitHub
parent 5112d9139d
commit 65bbb4f0eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,6 +73,7 @@ class CheckboxBase : public ComponentBase, public CheckboxOption {
event.mouse().motion == Mouse::Pressed) { event.mouse().motion == Mouse::Pressed) {
*checked = !*checked; *checked = !*checked;
on_change(); on_change();
TakeFocus();
return true; return true;
} }