From 87a103bc52553253b1753d96d612b0deea9a5192 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 24 Aug 2021 17:39:56 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Max Brunsfeld --- zed/assets/themes/_base.toml | 2 +- zed/src/theme.rs | 58 ++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/zed/assets/themes/_base.toml b/zed/assets/themes/_base.toml index 021ba25789..1714558494 100644 --- a/zed/assets/themes/_base.toml +++ b/zed/assets/themes/_base.toml @@ -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" diff --git a/zed/src/theme.rs b/zed/src/theme.rs index c99cd0e39c..a502f2ae67 100644 --- a/zed/src/theme.rs +++ b/zed/src/theme.rs @@ -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, -} - -#[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, +} + +#[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, D::Error>