diff --git a/zed/assets/themes/_base.toml b/zed/assets/themes/_base.toml index 08fb222f6de66262c8c4f5672e6b39f366a8be07..bdb79c5a974fc8a2bf4623566e25dd3a50ec917b 100644 --- a/zed/assets/themes/_base.toml +++ b/zed/assets/themes/_base.toml @@ -1,3 +1,6 @@ +[text] +base = { family = "Inconsolata", size = 14 } + [workspace] background = "$surface.0" @@ -19,10 +22,12 @@ padding = { left = 10, right = 10 } [workspace.sidebar.resize_handle] margin = { left = 6 } -[workspace.sidebar_icon] +[workspace.sidebar.icon] color = "$text.2.color" +height = 18 -[workspace.active_sidebar_icon] +[workspace.sidebar.active_icon] +extends = "$workspace.sidebar.icon" color = "$text.0.color" [chat_panel] diff --git a/zed/src/theme.rs b/zed/src/theme.rs index 84748e4b0c43490a2d1c5a918bc07df65aed95cc..cd65db1e623b17fe525c448d16fa3e0b5f29c386 100644 --- a/zed/src/theme.rs +++ b/zed/src/theme.rs @@ -36,8 +36,6 @@ pub struct Workspace { pub tab: Tab, pub active_tab: Tab, pub sidebar: Sidebar, - pub sidebar_icon: SidebarIcon, - pub active_sidebar_icon: SidebarIcon, } #[derive(Deserialize)] @@ -54,12 +52,15 @@ pub struct Tab { #[derive(Deserialize)] pub struct Sidebar { pub icons: ContainerStyle, + pub icon: SidebarIcon, + pub active_icon: SidebarIcon, pub resize_handle: ContainerStyle, } #[derive(Deserialize)] pub struct SidebarIcon { pub color: Color, + pub height: f32, } #[derive(Deserialize)] diff --git a/zed/src/workspace/sidebar.rs b/zed/src/workspace/sidebar.rs index b6de41b92c406c87b831796a41616052aeb6f437..e900e8c10246dcd1b56dc0a5ae3dfec15d474ff0 100644 --- a/zed/src/workspace/sidebar.rs +++ b/zed/src/workspace/sidebar.rs @@ -71,9 +71,9 @@ impl Sidebar { Flex::column() .with_children(self.items.iter().enumerate().map(|(item_index, item)| { let theme = if Some(item_index) == self.active_item_ix { - &settings.theme.workspace.active_sidebar_icon + &settings.theme.workspace.sidebar.active_icon } else { - &settings.theme.workspace.sidebar_icon + &settings.theme.workspace.sidebar.icon }; enum SidebarButton {} MouseEventHandler::new::(item.view.id(), cx, |_, _| { @@ -82,7 +82,7 @@ impl Sidebar { ConstrainedBox::new( Svg::new(item.icon_path).with_color(theme.color).boxed(), ) - .with_height(line_height) + .with_height(theme.height) .boxed(), ) .boxed(),