History

theme2: Add Sandcastle theme

Marshall Bowers committed 3 years ago

Commit cee81751 parent 751df453 files · +102 −2Browse files

Unified · Split

3 files
  1. crates/theme2/src/registry.rs +5 −2
  2. crates/theme2/src/themes/mod.rs +2 −0
  3. crates/theme2/src/themes/sandcastle.rs +95 −0
crates/theme2/src/registry.rs+5−2
@@ -1,4 +1,7 @@
1−use crate::{themes::one_dark, Theme, ThemeMetadata};
1+use crate::{
2+ themes::{one_dark, sandcastle},
3+ Theme, ThemeMetadata,
4+};
25 use anyhow::{anyhow, Result};
36 use gpui2::SharedString;
47 use std::{collections::HashMap, sync::Arc};
@@ -37,7 +40,7 @@ impl Default for ThemeRegistry { · 32 unmodified lines
3740 themes: HashMap::default(),
3841 };
3942
40− this.insert_themes([one_dark()]);
43+ this.insert_themes([one_dark(), sandcastle()]);
4144
4245 this
4346 }
crates/theme2/src/themes/mod.rs+2−0
@@ -1,3 +1,5 @@
11 mod one_dark;
2+mod sandcastle;
23
34 pub use one_dark::*;
5+pub use sandcastle::*;
crates/theme2/src/themes/sandcastle.rs+95−0
@@ -0,0 +1,95 @@
1+use gpui2::rgba;
2+
3+use crate::{PlayerTheme, SyntaxTheme, Theme, ThemeMetadata};
4+
5+pub fn sandcastle() -> Theme {
6+ Theme {
7+ metadata: ThemeMetadata {
8+ name: "Sandcastle".into(),
9+ is_light: false,
10+ },
11+ transparent: rgba(0x00000000).into(),
12+ mac_os_traffic_light_red: rgba(0xec695eff).into(),
13+ mac_os_traffic_light_yellow: rgba(0xf4bf4eff).into(),
14+ mac_os_traffic_light_green: rgba(0x61c553ff).into(),
15+ border: rgba(0x3d4350ff).into(),
16+ border_variant: rgba(0x3d4350ff).into(),
17+ border_focused: rgba(0x223131ff).into(),
18+ border_transparent: rgba(0x00000000).into(),
19+ elevated_surface: rgba(0x333944ff).into(),
20+ surface: rgba(0x2b3038ff).into(),
21+ background: rgba(0x333944ff).into(),
22+ filled_element: rgba(0x333944ff).into(),
23+ filled_element_hover: rgba(0xffffff1e).into(),
24+ filled_element_active: rgba(0xffffff28).into(),
25+ filled_element_selected: rgba(0x171e1eff).into(),
26+ filled_element_disabled: rgba(0x00000000).into(),
27+ ghost_element: rgba(0x00000000).into(),
28+ ghost_element_hover: rgba(0xffffff14).into(),
29+ ghost_element_active: rgba(0xffffff1e).into(),
30+ ghost_element_selected: rgba(0x171e1eff).into(),
31+ ghost_element_disabled: rgba(0x00000000).into(),
32+ text: rgba(0xfdf4c1ff).into(),
33+ text_muted: rgba(0xa69782ff).into(),
34+ text_placeholder: rgba(0xb3627aff).into(),
35+ text_disabled: rgba(0x827568ff).into(),
36+ text_accent: rgba(0x518b8bff).into(),
37+ icon_muted: rgba(0xa69782ff).into(),
38+ syntax: SyntaxTheme {
39+ comment: rgba(0xff00ffff).into(),
40+ string: rgba(0xff00ffff).into(),
41+ function: rgba(0xff00ffff).into(),
42+ keyword: rgba(0xff00ffff).into(),
43+ highlights: Vec::new(),
44+ },
45+ status_bar: rgba(0x333944ff).into(),
46+ title_bar: rgba(0x333944ff).into(),
47+ toolbar: rgba(0x282c33ff).into(),
48+ tab_bar: rgba(0x2b3038ff).into(),
49+ editor: rgba(0x282c33ff).into(),
50+ editor_subheader: rgba(0x2b3038ff).into(),
51+ editor_active_line: rgba(0x2b3038ff).into(),
52+ terminal: rgba(0x282c33ff).into(),
53+ image_fallback_background: rgba(0x333944ff).into(),
54+ git_created: rgba(0x83a598ff).into(),
55+ git_modified: rgba(0x518b8bff).into(),
56+ git_deleted: rgba(0xb3627aff).into(),
57+ git_conflict: rgba(0xa07d3aff).into(),
58+ git_ignored: rgba(0x827568ff).into(),
59+ git_renamed: rgba(0xa07d3aff).into(),
60+ players: [
61+ PlayerTheme {
62+ cursor: rgba(0x518b8bff).into(),
63+ selection: rgba(0x518b8b3d).into(),
64+ },
65+ PlayerTheme {
66+ cursor: rgba(0x83a598ff).into(),
67+ selection: rgba(0x83a5983d).into(),
68+ },
69+ PlayerTheme {
70+ cursor: rgba(0xa87222ff).into(),
71+ selection: rgba(0xa872223d).into(),
72+ },
73+ PlayerTheme {
74+ cursor: rgba(0xa07d3aff).into(),
75+ selection: rgba(0xa07d3a3d).into(),
76+ },
77+ PlayerTheme {
78+ cursor: rgba(0xd75f5fff).into(),
79+ selection: rgba(0xd75f5f3d).into(),
80+ },
81+ PlayerTheme {
82+ cursor: rgba(0x83a598ff).into(),
83+ selection: rgba(0x83a5983d).into(),
84+ },
85+ PlayerTheme {
86+ cursor: rgba(0xb3627aff).into(),
87+ selection: rgba(0xb3627a3d).into(),
88+ },
89+ PlayerTheme {
90+ cursor: rgba(0xa07d3aff).into(),
91+ selection: rgba(0xa07d3a3d).into(),
92+ },
93+ ],
94+ }
95+}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t