Context
Related to #52118
Found this while looking into the theme selector filtering bug: clicking
outside the theme selector (or icon theme selector) keeps the previewed
theme applied instead of reverting. `hide_modal()` doesn't go through
the Picker's `dismissed()` callback, so the in-memory theme override
sticks around without being written to `settings.json`.
This PR only fixes the click-outside behavior. The filtering issue from
#52118 is separate.
## Demo
**Before (bug):**
https://github.com/user-attachments/assets/f8be49c4-7e1d-483c-bf23-346022ac83aa
**After (fix):**
https://github.com/user-attachments/assets/29cc1740-c869-42d1-8aee-fe46a091a949
## How to review
Two files, symmetrical changes. Look at:
- `on_before_dismiss` in `theme_selector.rs` and
`icon_theme_selector.rs`
- The extracted `revert_theme()` method on both delegates, now shared
between `dismissed()` and `on_before_dismiss`
## Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] 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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Fixed theme selector keeping the previewed theme when clicking outside
instead of reverting to the original.