zed/crates/theme_selector
Marshall Bowers a80a3b8706
Add support for specifying both light and dark themes in settings.json (#7404)
This PR adds support for configuring both a light and dark theme in
`settings.json`.

In addition to accepting just a theme name, the `theme` field now also
accepts an object in the following form:

```jsonc
{
  "theme": {
    "mode": "system",
    "light": "One Light",
    "dark": "One Dark"
  }
}
```

Both `light` and `dark` are required, and indicate which theme should be
used when the system is in light mode and dark mode, respectively.

The `mode` field is optional and indicates which theme should be used:
- `"system"` - Use the theme that corresponds to the system's
appearance.
- `"light"` - Use the theme indicated by the `light` field.
- `"dark"` - Use the theme indicated by the `dark` field.

Thank you to @Yesterday17 for taking a first stab at this in #6881!

Release Notes:

- Added support for configuring both a light and dark theme and
switching between them based on system preference.
2024-02-05 15:39:01 -05:00
..
src Add support for specifying both light and dark themes in settings.json (#7404) 2024-02-05 15:39:01 -05:00
Cargo.toml Sort dependencies in Cargo.toml files (#7126) 2024-01-30 21:41:29 -05:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00