Automate settings registration (#42238)

Release Notes:

- N/A

---------

Co-authored-by: Nia <nia@zed.dev>
This commit is contained in:
Mikayla Maki
2025-11-07 22:27:14 +00:00
committed by GitHub
co-authored by Nia
parent 309947aa53
commit 5f8226457e
161 changed files with 196 additions and 599 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ use refineable::Refineable;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
pub use settings::{FontFamilyName, IconThemeName, ThemeMode, ThemeName};
use settings::{Settings, SettingsContent};
use settings::{RegisterSetting, Settings, SettingsContent};
use std::sync::Arc;
const MIN_FONT_SIZE: Pixels = px(6.0);
@@ -94,7 +94,7 @@ impl From<settings::UiDensity> for UiDensity {
}
/// Customizable settings for the UI and theme system.
#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, RegisterSetting)]
pub struct ThemeSettings {
/// The UI font size. Determines the size of text in the UI,
/// as well as the size of a [gpui::Rems] unit.
-1
View File
@@ -108,7 +108,6 @@ pub fn init(themes_to_load: LoadThemes, cx: &mut App) {
ThemeRegistry::global(cx).load_bundled_themes();
}
ThemeSettings::register(cx);
FontFamilyCache::init_global(cx);
let theme = GlobalTheme::configured_theme(cx);