default_theme.rs

 1use std::sync::Arc;
 2
 3use crate::{
 4    colors::{StatusColors, SystemColors, ThemeColors, ThemeStyles},
 5    default_color_scales, Appearance, PlayerColors, SyntaxTheme, Theme, ThemeFamily,
 6};
 7
 8fn zed_pro_daylight() -> Theme {
 9    Theme {
10        id: "zed_pro_daylight".to_string(),
11        name: "Zed Pro Daylight".into(),
12        appearance: Appearance::Light,
13        styles: ThemeStyles {
14            system: SystemColors::default(),
15            colors: ThemeColors::default_light(),
16            status: StatusColors::default(),
17            player: PlayerColors::default_light(),
18            syntax: Arc::new(SyntaxTheme::default_light()),
19        },
20    }
21}
22
23pub(crate) fn zed_pro_moonlight() -> Theme {
24    Theme {
25        id: "zed_pro_moonlight".to_string(),
26        name: "Zed Pro Moonlight".into(),
27        appearance: Appearance::Dark,
28        styles: ThemeStyles {
29            system: SystemColors::default(),
30            colors: ThemeColors::default_dark(),
31            status: StatusColors::default(),
32            player: PlayerColors::default(),
33            syntax: Arc::new(SyntaxTheme::default_dark()),
34        },
35    }
36}
37
38pub fn zed_pro_family() -> ThemeFamily {
39    ThemeFamily {
40        id: "zed_pro".to_string(),
41        name: "Zed Pro".into(),
42        author: "Zed Team".into(),
43        themes: vec![zed_pro_daylight(), zed_pro_moonlight()],
44        scales: default_color_scales(),
45    }
46}
47
48impl Default for ThemeFamily {
49    fn default() -> Self {
50        zed_pro_family()
51    }
52}
53
54impl Default for Theme {
55    fn default() -> Self {
56        zed_pro_daylight()
57    }
58}