mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-07 11:11:30 +00:00
💄
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
621203eb60
commit
87a103bc52
2 changed files with 30 additions and 30 deletions
|
@ -9,7 +9,7 @@ icon_dirty = "$status.info"
|
||||||
icon_conflict = "$status.warn"
|
icon_conflict = "$status.warn"
|
||||||
|
|
||||||
[workspace.active_tab]
|
[workspace.active_tab]
|
||||||
extends = "$tab"
|
extends = "$workspace.tab"
|
||||||
background = "$surface.1"
|
background = "$surface.1"
|
||||||
text = "$text.0"
|
text = "$text.0"
|
||||||
|
|
||||||
|
|
|
@ -36,23 +36,6 @@ pub struct Workspace {
|
||||||
pub active_sidebar_icon: SidebarIcon,
|
pub active_sidebar_icon: SidebarIcon,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
|
||||||
pub struct Editor {
|
|
||||||
pub background: Color,
|
|
||||||
pub gutter_background: Color,
|
|
||||||
pub active_line_background: Color,
|
|
||||||
pub line_number: Color,
|
|
||||||
pub line_number_active: Color,
|
|
||||||
pub text: Color,
|
|
||||||
pub replicas: Vec<Replica>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Default, Deserialize)]
|
|
||||||
pub struct Replica {
|
|
||||||
pub cursor: Color,
|
|
||||||
pub selection: Color,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Default, Deserialize)]
|
#[derive(Debug, Default, Deserialize)]
|
||||||
pub struct Tab {
|
pub struct Tab {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
@ -88,18 +71,21 @@ pub struct SelectorItem {
|
||||||
pub label: LabelStyle,
|
pub label: LabelStyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Editor {
|
#[derive(Debug, Deserialize)]
|
||||||
fn default() -> Self {
|
pub struct Editor {
|
||||||
Self {
|
pub background: Color,
|
||||||
background: Default::default(),
|
pub gutter_background: Color,
|
||||||
gutter_background: Default::default(),
|
pub active_line_background: Color,
|
||||||
active_line_background: Default::default(),
|
pub line_number: Color,
|
||||||
line_number: Default::default(),
|
pub line_number_active: Color,
|
||||||
line_number_active: Default::default(),
|
pub text: Color,
|
||||||
text: Default::default(),
|
pub replicas: Vec<Replica>,
|
||||||
replicas: vec![Replica::default()],
|
}
|
||||||
}
|
|
||||||
}
|
#[derive(Clone, Copy, Debug, Default, Deserialize)]
|
||||||
|
pub struct Replica {
|
||||||
|
pub cursor: Color,
|
||||||
|
pub selection: Color,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Theme {
|
impl Theme {
|
||||||
|
@ -119,6 +105,20 @@ impl Theme {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Editor {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self {
|
||||||
|
background: Default::default(),
|
||||||
|
gutter_background: Default::default(),
|
||||||
|
active_line_background: Default::default(),
|
||||||
|
line_number: Default::default(),
|
||||||
|
line_number_active: Default::default(),
|
||||||
|
text: Default::default(),
|
||||||
|
replicas: vec![Replica::default()],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn deserialize_syntax_theme<'de, D>(
|
pub fn deserialize_syntax_theme<'de, D>(
|
||||||
deserializer: D,
|
deserializer: D,
|
||||||
) -> Result<Vec<(String, TextStyle)>, D::Error>
|
) -> Result<Vec<(String, TextStyle)>, D::Error>
|
||||||
|
|
Loading…
Reference in a new issue