co-authored by
Max Brunsfeld
parent
621203eb60
commit
87a103bc52
@@ -9,7 +9,7 @@ icon_dirty = "$status.info"
|
||||
icon_conflict = "$status.warn"
|
||||
|
||||
[workspace.active_tab]
|
||||
extends = "$tab"
|
||||
extends = "$workspace.tab"
|
||||
background = "$surface.1"
|
||||
text = "$text.0"
|
||||
|
||||
|
||||
+29
-29
@@ -36,23 +36,6 @@ pub struct Workspace {
|
||||
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)]
|
||||
pub struct Tab {
|
||||
#[serde(flatten)]
|
||||
@@ -88,18 +71,21 @@ pub struct SelectorItem {
|
||||
pub label: LabelStyle,
|
||||
}
|
||||
|
||||
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()],
|
||||
}
|
||||
}
|
||||
#[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,
|
||||
}
|
||||
|
||||
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>(
|
||||
deserializer: D,
|
||||
) -> Result<Vec<(String, TextStyle)>, D::Error>
|
||||
|
||||
Reference in New Issue
Block a user