Settings refactor (#38367)

Co-Authored-By: Ben K <ben@zed.dev>
Co-Authored-By: Anthony <anthony@zed.dev>
Co-Authored-By: Mikayla <mikayla@zed.dev>

Release Notes:

- settings: Major internal changes to settings. The primary user-facing
effect is that some settings which did not make sense in project
settings files are no-longer read from there. (For example the inline
blame settings)

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
Conrad Irwin
2025-09-18 16:47:23 +00:00
committed by GitHub
co-authored by Ben Kunkle Mikayla Maki Anthony
parent 0a9023bce0
commit fcdab160f9
219 changed files with 11697 additions and 11894 deletions
+6 -6
View File
@@ -66,9 +66,9 @@ pub fn derive_spacing(input: TokenStream) -> TokenStream {
let n = n.base10_parse::<f32>().unwrap();
quote! {
DynamicSpacing::#variant => match ThemeSettings::get_global(cx).ui_density {
UiDensity::Compact => (#n - 4.0).max(0.0) / BASE_REM_SIZE_IN_PX,
UiDensity::Default => #n / BASE_REM_SIZE_IN_PX,
UiDensity::Comfortable => (#n + 4.0) / BASE_REM_SIZE_IN_PX,
::theme::UiDensity::Compact => (#n - 4.0).max(0.0) / BASE_REM_SIZE_IN_PX,
::theme::UiDensity::Default => #n / BASE_REM_SIZE_IN_PX,
::theme::UiDensity::Comfortable => (#n + 4.0) / BASE_REM_SIZE_IN_PX,
}
}
}
@@ -78,9 +78,9 @@ pub fn derive_spacing(input: TokenStream) -> TokenStream {
let c = c.base10_parse::<f32>().unwrap();
quote! {
DynamicSpacing::#variant => match ThemeSettings::get_global(cx).ui_density {
UiDensity::Compact => #a / BASE_REM_SIZE_IN_PX,
UiDensity::Default => #b / BASE_REM_SIZE_IN_PX,
UiDensity::Comfortable => #c / BASE_REM_SIZE_IN_PX,
::theme::UiDensity::Compact => #a / BASE_REM_SIZE_IN_PX,
::theme::UiDensity::Default => #b / BASE_REM_SIZE_IN_PX,
::theme::UiDensity::Comfortable => #c / BASE_REM_SIZE_IN_PX,
}
}
}