1use std::sync::Arc;
2
3use gpui::WindowBackgroundAppearance;
4
5use crate::prelude::*;
6
7use crate::{
8 default_color_scales,
9 one_themes::{one_dark, one_family},
10 Appearance, PlayerColors, StatusColors, SyntaxTheme, SystemColors, Theme, ThemeColors,
11 ThemeFamily, ThemeStyles,
12};
13
14fn zed_pro_daylight() -> Theme {
15 Theme {
16 id: "zed_pro_daylight".to_string(),
17 name: "Zed Pro Daylight".into(),
18 appearance: Appearance::Light,
19 styles: ThemeStyles {
20 window_background_appearance: WindowBackgroundAppearance::Opaque,
21 system: SystemColors::default(),
22 colors: ThemeColors::light(),
23 status: StatusColors::light(),
24 player: PlayerColors::light(),
25 syntax: Arc::new(SyntaxTheme::light()),
26 accents: vec![
27 blue().light().step_9(),
28 orange().light().step_9(),
29 pink().light().step_9(),
30 lime().light().step_9(),
31 purple().light().step_9(),
32 amber().light().step_9(),
33 jade().light().step_9(),
34 tomato().light().step_9(),
35 cyan().light().step_9(),
36 gold().light().step_9(),
37 grass().light().step_9(),
38 indigo().light().step_9(),
39 iris().light().step_9(),
40 ],
41 },
42 }
43}
44
45pub(crate) fn zed_pro_moonlight() -> Theme {
46 Theme {
47 id: "zed_pro_moonlight".to_string(),
48 name: "Zed Pro Moonlight".into(),
49 appearance: Appearance::Dark,
50 styles: ThemeStyles {
51 window_background_appearance: WindowBackgroundAppearance::Opaque,
52 system: SystemColors::default(),
53 colors: ThemeColors::dark(),
54 status: StatusColors::dark(),
55 player: PlayerColors::dark(),
56 syntax: Arc::new(SyntaxTheme::dark()),
57 accents: vec![
58 blue().dark().step_9(),
59 orange().dark().step_9(),
60 pink().dark().step_9(),
61 lime().dark().step_9(),
62 purple().dark().step_9(),
63 amber().dark().step_9(),
64 jade().dark().step_9(),
65 tomato().dark().step_9(),
66 cyan().dark().step_9(),
67 gold().dark().step_9(),
68 grass().dark().step_9(),
69 indigo().dark().step_9(),
70 iris().dark().step_9(),
71 ],
72 },
73 }
74}
75
76pub fn zed_pro_family() -> ThemeFamily {
77 ThemeFamily {
78 id: "zed_pro".to_string(),
79 name: "Zed Pro".into(),
80 author: "Zed Team".into(),
81 themes: vec![zed_pro_daylight(), zed_pro_moonlight()],
82 scales: default_color_scales(),
83 }
84}
85
86impl Default for ThemeFamily {
87 fn default() -> Self {
88 one_family()
89 }
90}
91
92impl Default for Theme {
93 fn default() -> Self {
94 one_dark()
95 }
96}