default_theme.rs

 1use std::sync::Arc;
 2
 3use crate::{
 4    default_color_scales, Appearance, PlayerColors, StatusColors, SyntaxTheme, SystemColors, Theme,
 5    ThemeColors, ThemeFamily, ThemeStyles,
 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::light(),
16            status: StatusColors::light(),
17            player: PlayerColors::light(),
18            syntax: Arc::new(SyntaxTheme::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::dark(),
31            status: StatusColors::dark(),
32            player: PlayerColors::dark(),
33            syntax: Arc::new(SyntaxTheme::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}