Marshall Bowers
f81e3f4dab
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
9e7f83068a
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
Conrad Irwin
f9cee6b4cf
Convert rich_text2
2023-11-02 19:30:33 -06:00
Mikayla
d8b8390702
Remove the 2s from source code
2023-11-02 10:55:02 -07:00
Marshall Bowers
06597e894d
Remove unneeded .intos
2023-11-01 22:01:59 -04:00
Marshall Bowers
f8bea1d0dc
Update scale accessors
2023-11-01 22:00:16 -04:00
Marshall Bowers
a1a7797439
Merge branch 'main' into n/t2
2023-11-01 21:54:10 -04:00
Marshall Bowers
88ab95a68a
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
af09948a2c
Fix underflow when indexing into ColorScales
2023-11-01 21:15:06 -04:00
Marshall Bowers
c9b94196cd
Merge branch 'main' into n/t2
2023-11-01 21:11:26 -04:00
Marshall Bowers
faecc27eb5
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
76e0bdc7f0
Merge branch 'main' into n/t2
2023-11-01 16:52:43 -04:00
Nate Butler
b52624eb51
WIP
2023-11-01 16:19:49 -04:00
Marshall Bowers
3a6d95b185
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
304a0278b9
Merge branch 'n/t2' of github.com:zed-industries/zed into n/t2
2023-11-01 10:52:29 -04:00
Marshall Bowers
ecd3d7d02d
Remove unused impl
2023-11-01 10:52:25 -04:00
Nate Butler
a54450cd69
Continue refining default syntax theme
2023-11-01 10:50:00 -04:00
Marshall Bowers
1c407cf235
Fix return type
2023-11-01 10:48:23 -04:00
Marshall Bowers
55f084975e
Merge branch 'main' into n/t2
2023-11-01 10:46:27 -04:00
Marshall Bowers
a015c469bb
Return ColorScaleSets from individual color scale functions ( #3197 )
...
This PR adjusts the individual color scale functions to return
`ColorScaleSet`s instead of `DefaultColorScaleSet`s.
We only use the `DefaultColorScaleSet`s to simplify the construction of
the scales, so it isn't necessary to surface them outside of the
function.
Release Notes:
- N/A
2023-11-01 10:45:42 -04:00
Marshall Bowers
62c634f646
Remove blanket From<&str> impl for Hsla
...
Since this is a fallible operation we don't want to have a blanket
infallible conversion from any arbitrary `&str` to an `Hsla`.
2023-11-01 10:31:03 -04:00
Nate Butler
048f0bc2b4
Continue refining theme, update tabs & tab bar
2023-11-01 01:41:33 -04:00
Nate Butler
a8519a8cc4
Refine default colors
2023-11-01 00:51:57 -04:00
Marshall Bowers
c1fd535c70
Use Refineable for ThemeStyles ( #3196 )
...
This PR updates the `ThemeStyles` struct to use the `Refineable` trait
instead of a custom declarative macro for generating refinements.
Release Notes:
- N/A
2023-10-31 23:33:51 -04:00
Marshall Bowers
59b536af38
Remove old Theme definition ( #3195 )
...
This PR removes the old `Theme` definition in favor of the new
`ThemeVariant`s.
The new `SyntaxStyles` have been reverted to the old `SyntaxTheme` that
operates by storing the syntax styles as a vector of
`gpui2::HighlightStyle`s.
This is necessary for the intended usage by `language2`, where we find
the longest key in the theme's syntax styles that matches the capture
name:
https://github.com/zed-industries/zed/blob/766d5959beffcbb82352d5c64d704141aa24f21d/crates/language2/src/highlight_map.rs#L15-L41
2023-10-31 23:05:50 -04:00
766d5959be
Rework theme2 with new theme structure ( #3194 )
...
This PR reworks the theme definition in the `theme2` crate to be based
off of the new theme work that @iamnbutler has been working on.
We're still developing the new theme system, but it is complete enough
that we can now load the default theme and use it to theme the storybook
(albeit with some further refining of the color palette required).
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com >
Co-authored-by: Marshall Bowers <marshall@zed.dev >
2023-10-31 22:23:00 -04:00
Julia
6e45e454ff
Port zed/src/languages to zed2
2023-10-30 21:52:29 -04:00
Marshall Bowers
eb51192664
theme2: Correctly reference the dark alpha scale
2023-10-30 17:35:13 -04:00
Marshall Bowers
61b3fcafcf
Add a story showcasing the color scales
2023-10-30 17:31:15 -04:00
Marshall Bowers
d673be04ed
Fix alpha channel values for color scales
2023-10-30 17:20:43 -04:00
Marshall Bowers
95cb0ad4d6
Add type alias for steps in color scales
2023-10-30 17:08:37 -04:00
Marshall Bowers
a24b93badc
Register all of the color scales
2023-10-30 17:03:33 -04:00
Marshall Bowers
87b7f9ffb0
Define all color scales
2023-10-30 17:00:46 -04:00
Marshall Bowers
0dfa1839d6
Start work on defining color scales
2023-10-30 16:21:59 -04:00
Marshall Bowers
8fc8f80403
Remove old theme constructs
2023-10-30 14:47:44 -04:00
Marshall Bowers
0d314f6baf
Format theme2
2023-10-30 11:26:30 -04:00
Marshall Bowers
9d4ddb7171
Convert all themes
2023-10-30 11:22:04 -04:00
Marshall Bowers
bf473ea696
Revert changes to themes
2023-10-30 11:06:45 -04:00
Marshall Bowers
00bd9e05c4
Emit all themes at once
2023-10-30 11:04:03 -04:00
Marshall Bowers
64a3656e05
Pull syntax colors from JSON theme
2023-10-26 17:06:05 +02:00
Max Brunsfeld and Marshall Bowers
11b184fe16
Represent theme's syntax colors with string keys
...
Co-authored-by: Marshall Bowers <marshall@zed.dev >
2023-10-26 16:38:50 +02:00
Conrad Irwin
155ee01c0a
Revert "Fix settings2 crate tests"
...
This reverts commit 979132da04 .
2023-10-26 11:33:58 +02:00
Conrad Irwin
979132da04
Fix settings2 crate tests
2023-10-26 11:27:23 +02:00
Marshall Bowers
b219cfad15
Load themes from settings and rework Settings trait
2023-10-25 20:37:55 +02:00
Marshall Bowers
edf6820252
Make theme converter spit out valid Rust structs
2023-10-25 18:20:16 +02:00
Marshall Bowers
a47eb2d762
theme2: Add Rosé Pine themes
2023-10-25 17:38:48 +02:00
Marshall Bowers
acaba6a9ff
theme2: Add Sandcastle theme
2023-10-25 17:27:25 +02:00
Marshall Bowers
412d023056
Rename player to players
2023-10-25 16:39:06 +02:00
Marshall Bowers
29e72d4d10
Rename cx.global_default_mut to cx.global_default
2023-10-24 17:58:14 +02:00
Marshall Bowers
9fb7fe1aed
Finish up ThemeRegistry and remove AnyAssetSource
2023-10-24 17:47:41 +02:00