diff --git a/crates/ui/src/highlighter/themes/dark.json b/crates/ui/src/highlighter/themes/dark.json index 26080874..f561779d 100644 --- a/crates/ui/src/highlighter/themes/dark.json +++ b/crates/ui/src/highlighter/themes/dark.json @@ -3,8 +3,8 @@ "appearance": "dark", "style": { "editor.foreground": "#DDDDDD", - "editor.background": "#131313", - "editor.active_line.background": "#272727", + "editor.background": "#000000", + "editor.active_line.background": "#131313", "editor.line_number": "#8F8F8F", "editor.active_line_number": "#DDDDDD", "conflict": "#D2602D", diff --git a/crates/ui/src/highlighter/themes/light.json b/crates/ui/src/highlighter/themes/light.json index 0dd662c2..f2ecd9fc 100644 --- a/crates/ui/src/highlighter/themes/light.json +++ b/crates/ui/src/highlighter/themes/light.json @@ -4,7 +4,7 @@ "style": { "editor.foreground": "#000000", "editor.background": "#ffffff", - "editor.active_line.background": "#F0F0F0", + "editor.active_line.background": "#F5F5F5", "editor.line_number": "#929292", "editor.active_line_number": "#000000", "conflict": "#C5060B", @@ -172,4 +172,4 @@ } } } -} \ No newline at end of file +} diff --git a/crates/ui/src/text/element.rs b/crates/ui/src/text/element.rs index b6a17247..2808f2ec 100644 --- a/crates/ui/src/text/element.rs +++ b/crates/ui/src/text/element.rs @@ -581,6 +581,7 @@ impl Node { fn render_codeblock( code_block: CodeBlock, mb: Rems, + _: &TextViewStyle, _: &mut Window, cx: &mut App, ) -> AnyElement { @@ -588,7 +589,7 @@ impl Node { .mb(mb) .p_3() .rounded(cx.theme().radius) - .bg(cx.theme().secondary) + .bg(cx.theme().accent) .font_family("Menlo, Monaco, Consolas, monospace") .text_size(rems(0.875)) .relative() @@ -600,7 +601,7 @@ impl Node { self, list_state: Option, is_last_child: bool, - text_view_style: &TextViewStyle, + style: &TextViewStyle, window: &mut Window, cx: &mut App, ) -> impl IntoElement { @@ -608,7 +609,7 @@ impl Node { let mb = if in_list || is_last_child { rems(0.) } else { - text_view_style.paragraph_gap + style.paragraph_gap }; match self { @@ -617,7 +618,7 @@ impl Node { let children_len = children.len(); children.into_iter().enumerate().map(move |(index, c)| { let is_last_child = index == children_len - 1; - c.render(None, is_last_child, text_view_style, window, cx) + c.render(None, is_last_child, style, window, cx) }) }) .into_any_element(), @@ -633,7 +634,7 @@ impl Node { _ => (rems(1.), FontWeight::NORMAL), }; - let text_size = text_size.to_pixels(text_view_style.heading_base_font_size); + let text_size = text_size.to_pixels(style.heading_base_font_size); h_flex() .mb(rems(0.3)) @@ -669,7 +670,7 @@ impl Node { todo: list_state.todo, depth: list_state.depth, }, - text_view_style, + style, window, cx, )); @@ -681,7 +682,9 @@ impl Node { items }) .into_any_element(), - Node::CodeBlock(code_block) => Self::render_codeblock(code_block, mb, window, cx), + Node::CodeBlock(code_block) => { + Self::render_codeblock(code_block, mb, style, window, cx) + } Node::Table { .. } => Self::render_table(&self, window, cx).into_any_element(), Node::Divider => div() .bg(cx.theme().border) diff --git a/crates/ui/src/theme.rs b/crates/ui/src/theme.rs index 71dacdd2..172e8344 100644 --- a/crates/ui/src/theme.rs +++ b/crates/ui/src/theme.rs @@ -355,7 +355,7 @@ impl ThemeColor { pub fn dark() -> Self { Self { - accent: neutral_800(), + accent: neutral_900(), accent_foreground: neutral_50(), accordion: neutral_950(), accordion_active: neutral_800(),