Merge branch 'main' into import-theme

This commit is contained in:
Nate Butler 2023-11-02 20:16:09 -04:00
commit b4e2368943
145 changed files with 9416 additions and 5309 deletions

View file

@ -6,9 +6,9 @@ publish = false
[features]
test-support = [
"gpui2/test-support",
"gpui/test-support",
"fs/test-support",
"settings2/test-support"
"settings/test-support"
]
[lib]
@ -18,7 +18,7 @@ doctest = false
[dependencies]
anyhow.workspace = true
fs = { path = "../fs" }
gpui2 = { path = "../gpui2" }
gpui = { package = "gpui2", path = "../gpui2" }
indexmap = "1.6.2"
parking_lot.workspace = true
refineable.workspace = true
@ -26,11 +26,11 @@ schemars.workspace = true
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
settings2 = { path = "../settings2" }
settings = { package = "settings2", path = "../settings2" }
toml.workspace = true
util = { path = "../util" }
[dev-dependencies]
gpui2 = { path = "../gpui2", features = ["test-support"] }
gpui = { package = "gpui2", path = "../gpui2", features = ["test-support"] }
fs = { path = "../fs", features = ["test-support"] }
settings2 = { path = "../settings2", features = ["test-support"] }
settings = { package = "settings2", path = "../settings2", features = ["test-support"] }

View file

@ -1,4 +1,4 @@
use gpui2::Hsla;
use gpui::Hsla;
use refineable::Refineable;
use crate::SyntaxTheme;
@ -126,7 +126,7 @@ mod tests {
fn override_a_single_theme_color() {
let mut colors = ThemeColors::default_light();
let magenta: Hsla = gpui2::rgb(0xff00ff);
let magenta: Hsla = gpui::rgb(0xff00ff);
assert_ne!(colors.text, magenta);
@ -144,8 +144,8 @@ mod tests {
fn override_multiple_theme_colors() {
let mut colors = ThemeColors::default_light();
let magenta: Hsla = gpui2::rgb(0xff00ff);
let green: Hsla = gpui2::rgb(0x00ff00);
let magenta: Hsla = gpui::rgb(0xff00ff);
let green: Hsla = gpui::rgb(0x00ff00);
assert_ne!(colors.text, magenta);
assert_ne!(colors.background, green);

View file

@ -1,6 +1,6 @@
use std::num::ParseIntError;
use gpui2::{hsla, Hsla, Rgba};
use gpui::{hsla, Hsla, Rgba};
use crate::{
colors::{GitStatusColors, PlayerColor, PlayerColors, StatusColors, SystemColors, ThemeColors},

View file

@ -1,6 +1,6 @@
use crate::{zed_pro_family, ThemeFamily, ThemeVariant};
use anyhow::{anyhow, Result};
use gpui2::SharedString;
use gpui::SharedString;
use std::{collections::HashMap, sync::Arc};
pub struct ThemeRegistry {

View file

@ -1,4 +1,4 @@
use gpui2::{AppContext, Hsla, SharedString};
use gpui::{AppContext, Hsla, SharedString};
use crate::{ActiveTheme, Appearance};

View file

@ -1,6 +1,6 @@
use crate::{ThemeRegistry, ThemeVariant};
use anyhow::Result;
use gpui2::{px, AppContext, Font, FontFeatures, FontStyle, FontWeight, Pixels};
use gpui::{px, AppContext, Font, FontFeatures, FontStyle, FontWeight, Pixels};
use schemars::{
gen::SchemaGenerator,
schema::{InstanceType, Schema, SchemaObject},
@ -8,7 +8,7 @@ use schemars::{
};
use serde::{Deserialize, Serialize};
use serde_json::Value;
use settings2::{Settings, SettingsJsonSchemaParams};
use settings::{Settings, SettingsJsonSchemaParams};
use std::sync::Arc;
use util::ResultExt as _;
@ -105,7 +105,7 @@ pub fn reset_font_size(cx: &mut AppContext) {
}
}
impl settings2::Settings for ThemeSettings {
impl settings::Settings for ThemeSettings {
const KEY: Option<&'static str> = None;
type FileContent = ThemeSettingsContent;

View file

@ -1,4 +1,4 @@
use gpui2::{HighlightStyle, Hsla};
use gpui::{HighlightStyle, Hsla};
#[derive(Clone, Default)]
pub struct SyntaxTheme {

View file

@ -6,6 +6,7 @@ mod scale;
mod settings;
mod syntax;
use ::settings::Settings;
pub use colors::*;
pub use default_colors::*;
pub use default_theme::*;
@ -14,8 +15,7 @@ pub use scale::*;
pub use settings::*;
pub use syntax::*;
use gpui2::{AppContext, Hsla, SharedString};
use settings2::Settings;
use gpui::{AppContext, Hsla, SharedString};
#[derive(Debug, PartialEq, Clone, Copy)]
pub enum Appearance {