Start moving default settings into a JSON file

Co-authored-by: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Max Brunsfeld
2022-07-12 11:00:02 -07:00
co-authored by Antonio Scandurra
parent 1ac8265028
commit e51dc25e1d
5 changed files with 82 additions and 89 deletions
+5 -2
View File
@@ -608,8 +608,11 @@ mod tests {
let fonts = cx.font_cache();
let mut theme = gpui::fonts::with_font_cache(fonts.clone(), || theme::Theme::default());
theme.search.match_background = Color::red();
let settings = Settings::new("Courier", &fonts, Arc::new(theme)).unwrap();
cx.update(|cx| cx.set_global(settings));
cx.update(|cx| {
let mut settings = Settings::test(cx);
settings.theme = Arc::new(theme);
cx.set_global(settings)
});
let buffer = cx.add_model(|cx| {
Buffer::new(
+5 -2
View File
@@ -911,8 +911,11 @@ mod tests {
let fonts = cx.font_cache();
let mut theme = gpui::fonts::with_font_cache(fonts.clone(), || theme::Theme::default());
theme.search.match_background = Color::red();
let settings = Settings::new("Courier", &fonts, Arc::new(theme)).unwrap();
cx.update(|cx| cx.set_global(settings));
cx.update(|cx| {
let mut settings = Settings::test(cx);
settings.theme = Arc::new(theme);
cx.set_global(settings)
});
let fs = FakeFs::new(cx.background());
fs.insert_tree(