Merge branch 'main' into import-theme

This commit is contained in:
Nate Butler
2023-11-02 20:16:09 -04:00
145 changed files with 9416 additions and 5309 deletions
+4 -4
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);
+1 -1
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},
+1 -1
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 {
+1 -1
View File
@@ -1,4 +1,4 @@
use gpui2::{AppContext, Hsla, SharedString};
use gpui::{AppContext, Hsla, SharedString};
use crate::{ActiveTheme, Appearance};
+3 -3
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;
+1 -1
View File
@@ -1,4 +1,4 @@
use gpui2::{HighlightStyle, Hsla};
use gpui::{HighlightStyle, Hsla};
#[derive(Clone, Default)]
pub struct SyntaxTheme {
+2 -2
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 {