diff --git a/crates/agent_ui/src/acp/message_editor.rs b/crates/agent_ui/src/acp/message_editor.rs index 702be48ae4aab28f23531bb92392844ca9509498..47847aef53cbd597c78cf329467a35ff1ac68978 100644 --- a/crates/agent_ui/src/acp/message_editor.rs +++ b/crates/agent_ui/src/acp/message_editor.rs @@ -1334,6 +1334,7 @@ impl Render for MessageEditor { font_fallbacks: settings.buffer_font.fallbacks.clone(), font_features: settings.buffer_font.features.clone(), font_size: settings.agent_buffer_font_size(cx).into(), + font_weight: settings.buffer_font.weight, line_height: relative(settings.buffer_line_height.value()), ..Default::default() }; diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 387ab0278b9678ddba066f205cf9df67ede9134f..0fdffc32f8dde2088f654dfd4f9f8f0453c2ac70 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -28233,7 +28233,7 @@ impl ui_input::ErasedEditor for ErasedEditorImpl { font_family: settings.ui_font.family.clone(), font_features: settings.ui_font.features.clone(), font_size: rems(0.875).into(), - font_weight: settings.buffer_font.weight, + font_weight: settings.ui_font.weight, font_style: FontStyle::Normal, line_height: relative(1.2), color: theme_color.text, diff --git a/crates/editor/src/hover_popover.rs b/crates/editor/src/hover_popover.rs index b3039a1545f634302e2767f3c0a2073f3a772827..f5d5e6d5ab69d690bd5f3aee29bf9aa493cf0059 100644 --- a/crates/editor/src/hover_popover.rs +++ b/crates/editor/src/hover_popover.rs @@ -613,6 +613,7 @@ pub fn hover_markdown_style(window: &Window, cx: &App) -> MarkdownStyle { let buffer_font_family = settings.buffer_font.family.clone(); let buffer_font_features = settings.buffer_font.features.clone(); let buffer_font_fallbacks = settings.buffer_font.fallbacks.clone(); + let buffer_font_weight = settings.buffer_font.weight; let mut base_text_style = window.text_style(); base_text_style.refine(&TextStyleRefinement { @@ -627,12 +628,14 @@ pub fn hover_markdown_style(window: &Window, cx: &App) -> MarkdownStyle { code_block: StyleRefinement::default() .my(rems(1.)) .font_buffer(cx) - .font_features(buffer_font_features.clone()), + .font_features(buffer_font_features.clone()) + .font_weight(buffer_font_weight), inline_code: TextStyleRefinement { background_color: Some(cx.theme().colors().background), font_family: Some(buffer_font_family), font_features: Some(buffer_font_features), font_fallbacks: buffer_font_fallbacks, + font_weight: Some(buffer_font_weight), ..Default::default() }, rule_color: cx.theme().colors().border, diff --git a/crates/markdown/src/markdown.rs b/crates/markdown/src/markdown.rs index c87491435200b6826708174d8f9946ec6942ca3f..1cd19ffb8f7cfa16ab1aa95af9425690aba78707 100644 --- a/crates/markdown/src/markdown.rs +++ b/crates/markdown/src/markdown.rs @@ -112,6 +112,7 @@ impl MarkdownStyle { let theme_settings = ThemeSettings::get_global(cx); let colors = cx.theme().colors(); + let buffer_font_weight = theme_settings.buffer_font.weight; let (buffer_font_size, ui_font_size) = match font { MarkdownFont::Agent => ( theme_settings.agent_buffer_font_size(cx), @@ -196,6 +197,7 @@ impl MarkdownStyle { font_fallbacks: theme_settings.buffer_font.fallbacks.clone(), font_features: Some(theme_settings.buffer_font.features.clone()), font_size: Some(buffer_font_size.into()), + font_weight: Some(buffer_font_weight), ..Default::default() }, ..Default::default() @@ -205,6 +207,7 @@ impl MarkdownStyle { font_fallbacks: theme_settings.buffer_font.fallbacks.clone(), font_features: Some(theme_settings.buffer_font.features.clone()), font_size: Some(buffer_font_size.into()), + font_weight: Some(buffer_font_weight), background_color: Some(colors.editor_foreground.opacity(0.08)), ..Default::default() }, diff --git a/crates/ui/src/components/label/label_like.rs b/crates/ui/src/components/label/label_like.rs index 03fde4083d5e9a8e07f38c830edd5116f14e6d70..ba39d7e16f7c5ac12cbfaba7abe921884d71e37f 100644 --- a/crates/ui/src/components/label/label_like.rs +++ b/crates/ui/src/components/label/label_like.rs @@ -189,9 +189,9 @@ impl LabelCommon for LabelLike { } fn buffer_font(mut self, cx: &App) -> Self { - self.base = self - .base - .font(theme::ThemeSettings::get_global(cx).buffer_font.clone()); + let font = theme::ThemeSettings::get_global(cx).buffer_font.clone(); + self.weight = Some(font.weight); + self.base = self.base.font(font); self }