settings_ui: Toggle root navbar entries on double-click (#55526)

Settings navbar root entries can now be expanded or collapsed by
double-clicking the row itself.

Single-click navigation is preserved, so clicking a root entry still
opens the selected Settings page. The double-click handler only toggles
on `click_count() == 2`, so triple-clicking the row does not toggle it
again.

The double-click path reuses the same toggle-and-focus behavior as the
disclosure chevron.

Testing:

- `cargo fmt --check --package settings_ui`
- `cargo check -p settings_ui`
- `cargo test -p settings_ui`
- Manually verified that:
- single-clicking a Settings navbar root entry still opens the selected
Settings page
  - double-clicking a Settings navbar root entry expands or collapses it
  - triple-clicking the row does not toggle the entry again
  - clicking the disclosure chevron still expands or collapses the entry

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Improved Settings navigation by allowing root navbar entries to expand
or collapse on double-click.
c958a12bccnajeira committed on 5/5/2026, 2:48:49 AM· committed by GitHubparent008d542
1 file changedLine totals unavailable