Commit Graph
85 Commits
Author SHA1 Message Date
Antonio Scandurra aa17adaac9 Merge remote-tracking branch 'origin/main' into editor-movement 2023-11-07 18:50:43 +01:00
Antonio Scandurra d7e86eb1c1 Merge remote-tracking branch 'origin/main' into editor-movement 2023-11-07 18:48:08 +01:00
Marshall Bowers 25876161f8 theme_importer: Format generated themes (#3255)
This PR makes the `theme_importer` format the themes that it generates
automatically.

Release Notes:

- N/A
2023-11-07 12:45:09 -05:00
Marshall Bowers 0d95410634 Rework third-party themes (#3254)
This PR reworks the way we define our third-party themes to make them
work as overlays on top of a base theme.

We introduce the concept of a `UserThemeFamily` that contains
`UserTheme`s. Rather than being an entire theme definition on their own,
a `UserTheme` just contains optional overrides for the values in a
`Theme`.

When resolving a `UserTheme`, we apply it on top of the base theme. Any
values not overridden in the `UserTheme` will fall back to the `Theme`
defaults.

Right now we are just using `UserTheme` to model third-party themes that
we distribute with the Zed binary. However, this same structure can also
be used to import arbitrary user themes (such as from a theme registry,
or even a theme blob from the settings file).

Release Notes:

- N/A
2023-11-07 11:40:07 -05:00
Marshall Bowers 74853ea55f Rename ThemeVariant to Theme (#3252)
This PR renames the `ThemeVariant` type to `Theme`.

This better reflects its purpose, as well as matches the same name as we
had before, which should make porting crates slightly easier.

Release Notes:

- N/A
2023-11-07 10:41:36 -05:00
Marshall Bowers 7078c5fbb9 Regenerate all themes 2023-11-07 08:59:50 -05:00
Marshall Bowers 01eac50fc8 Add new ThemeColors values to the theme printer 2023-11-07 08:59:37 -05:00
Antonio Scandurra 9f2e6be1b3 Fix warning 2023-11-07 14:31:17 +01:00
Antonio Scandurra 268be71d8e Add colors for document highlights 2023-11-07 13:15:08 +01:00
Antonio Scandurra bdf6e8bcc7 Merge remote-tracking branch 'origin/main' into editor2-paint 2023-11-07 13:09:48 +01:00
Antonio Scandurra 6ae09634ce Remove focused field and use FocusHandle instead in Editor 2023-11-07 12:46:31 +01:00
Antonio Scandurra a866370dc1 Paint lines 2023-11-07 12:25:33 +01:00
Nate Butler 3cb72610b3 Finish up initial themes 2023-11-06 15:24:36 -05:00
Nate Butler 62981fc2ee Format themes 2023-11-06 14:58:34 -05:00
Nate Butler c47c64184c Add additional themes, update theme importer 2023-11-06 14:54:21 -05:00
Nate Butler 80f80df5cf Add Noctis Theme 2023-11-06 12:43:10 -05:00
Marshall Bowers f8504c349c Merge branch 'main' into import-theme 2023-11-06 12:08:46 -05:00
bf80c1da5b Rename fields in ThemeColors (#3242)
This PR applies a number of field renames in the `ThemeColors` struct
from the `import-theme` branch.

This will help prevent this branch from diverging too far from `main`.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-06 11:53:27 -05:00
Antonio Scandurra 769526a76a Paint editor background 2023-11-06 15:54:09 +01:00
Nate Butler 1bce5dcc69 Add checkboxes and their stories 2023-11-05 01:06:41 -05:00
Max Brunsfeld 436dc93441 WIP2000 2023-11-03 16:40:37 -07:00
Marshall Bowers 287ea0a6e4 Allow deriving Serialize and Deserialize on generated refinement (#3227)
This PR adds support for deriving `Serialize` and `Deserialize` on the
refinement type generated by `#[derive(Refineable)]`.

Release Notes:

- N/A
2023-11-03 17:21:00 -04:00
Marshall Bowers 12500364b4 Merge branch 'main' into import-theme 2023-11-03 15:41:12 -04:00
Marshall Bowers fa7d6c0e70 Remove Default impl for ThemeColors` (#3226)
This PR removes the `Default` impl for `ThemeColors`.

Since we need default light and dark variants for `ThemeColors`, we
can't use a single `Default` impl.

Release Notes:

- N/A
2023-11-03 15:40:50 -04:00
Antonio Scandurra 2a672e2126 WIP 2023-11-03 18:55:20 +01:00
Nate Butler b4e2368943 Merge branch 'main' into import-theme 2023-11-02 20:16:09 -04:00
Nate Butler 2b0c959137 Add terminal colors to ThemeColors, add _background to some color names. 2023-11-02 19:53:52 -04:00
Marshall Bowers 152ac6927f Add themes2/src/themes directory 2023-11-02 19:17:39 -04:00
Marshall Bowers d1636bf16b Finish up theme printer 2023-11-02 19:14:51 -04:00
Marshall Bowers e48332c81f Parse VSCode theme files 2023-11-02 18:00:55 -04:00
Nate ButlerandMarshall Bowers 058981350c Scaffold out new theme-importer crate
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-02 17:21:11 -04:00
Nate Butler 972f076b4d Deserialize theme metadata 2023-11-02 16:31:22 -04:00
Nate Butler 58ac7f2926 [Broken] Load a src theme in test 2023-11-02 16:26:27 -04:00
Nate Butler 809d8786f1 WIP 2023-11-02 14:54:53 -04:00
Nate Butler 004c5d309b WIP 2023-11-02 14:23:43 -04:00
Mikayla d11ff14b57 Remove the 2s from source code 2023-11-02 10:55:02 -07:00
Marshall Bowers aa14552fee Remove unneeded .intos 2023-11-01 22:01:59 -04:00
Marshall Bowers b9ac1e43cd Update scale accessors 2023-11-01 22:00:16 -04:00
Marshall Bowers bd4bff47a0 Merge branch 'main' into n/t2 2023-11-01 21:54:10 -04:00
Marshall Bowers 72d060108d Make indexing into ColorScales safe (#3205)
This PR makes indexing into `ColorScale`s safe by constraining the
`ColorScaleStep`s to a set of known values.

Release Notes:

- N/A
2023-11-01 21:52:42 -04:00
Marshall Bowers 220228c183 Fix underflow when indexing into ColorScales 2023-11-01 21:15:06 -04:00
Marshall Bowers 115bd65344 Merge branch 'main' into n/t2 2023-11-01 21:11:26 -04:00
Marshall Bowers 69aafe9ff6 Adjust ColorScale representation (#3204)
This PR adjusts the representations of `ColorScale`s to allow us to
remove an unsafe `From` impl when converting from the statically-defined
representation of the scale.

Release Notes:

- N/A
2023-11-01 21:10:50 -04:00
Nate Butler d0975aacac Merge branch 'main' into n/t2 2023-11-01 16:52:43 -04:00
Nate Butler 3f74f75dee WIP 2023-11-01 16:19:49 -04:00
Marshall Bowers b910bbf002 Add ui_font_size setting (#3199)
This PR adds a new `ui_font_size` setting that can be used to control
the scale of the entire UI.

We use the value in this setting to set the base rem size of the window.

Release Notes:

- N/A
2023-11-01 13:11:12 -04:00
Marshall Bowers 6ed60769ac Merge branch 'n/t2' of github.com:zed-industries/zed into n/t2 2023-11-01 10:52:29 -04:00
Marshall Bowers 3189cd779e Remove unused impl 2023-11-01 10:52:25 -04:00
Nate Butler 5d660759bf Continue refining default syntax theme 2023-11-01 10:50:00 -04:00
Marshall Bowers d2a8f972f3 Fix return type 2023-11-01 10:48:23 -04:00