Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Use user-defined font weight, where appropriate (#13653)
Gilles Peiffer065ab93ca77d
diff --git a/crates/assistant/src/inline_assistant.rs b/crates/assistant/src/inline_assistant.rsindex 855dba1d636..3c3a7991264 100644--- a/crates/assistant/src/inline_assistant.rs+++ b/crates/assistant/src/inline_assistant.rs@@ -18,9 +18,9 @@ use editor::{use fs::Fs;use futures::{channel::mpsc, SinkExt, Stream, StreamExt};use gpui::{- point, AppContext, EventEmitter, FocusHandle, FocusableView, FontStyle, FontWeight, Global,- HighlightStyle, Model, ModelContext, Subscription, Task, TextStyle, UpdateGlobal, View,- ViewContext, WeakView, WhiteSpace, WindowContext,+ point, AppContext, EventEmitter, FocusHandle, FocusableView, FontStyle, Global, HighlightStyle,+ Model, ModelContext, Subscription, Task, TextStyle, UpdateGlobal, View, ViewContext, WeakView,+ WhiteSpace, WindowContext,};use language::{Buffer, Point, Selection, TransactionId};use multi_buffer::MultiBufferRow;@@ -1730,7 +1730,7 @@ impl PromptEditor {font_family: settings.ui_font.family.clone(),font_features: settings.ui_font.features.clone(),font_size: rems(0.875).into(),- font_weight: FontWeight::NORMAL,+ font_weight: settings.ui_font.weight,font_style: FontStyle::Normal,line_height: relative(1.3),background_color: None,diff --git a/crates/language/src/outline.rs b/crates/language/src/outline.rsindex 7621280d7fd..d4d7c8eee23 100644--- a/crates/language/src/outline.rs+++ b/crates/language/src/outline.rs@@ -1,7 +1,7 @@use fuzzy::{StringMatch, StringMatchCandidate};use gpui::{- relative, AppContext, BackgroundExecutor, FontStyle, FontWeight, HighlightStyle, StyledText,- TextStyle, WhiteSpace,+ relative, AppContext, BackgroundExecutor, FontStyle, HighlightStyle, StyledText, TextStyle,+ WhiteSpace,};use settings::Settings;use std::ops::Range;@@ -159,7 +159,7 @@ pub fn render_item<T>(font_family: settings.buffer_font.family.clone(),font_features: settings.buffer_font.features.clone(),font_size: settings.buffer_font_size(cx).into(),- font_weight: FontWeight::NORMAL,+ font_weight: settings.buffer_font.weight,font_style: FontStyle::Normal,line_height: relative(1.),background_color: None,diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rsindex 216d5b9f6fa..ad737990fa0 100644--- a/crates/search/src/buffer_search.rs+++ b/crates/search/src/buffer_search.rs@@ -14,9 +14,9 @@ use editor::{use futures::channel::oneshot;use gpui::{actions, div, impl_actions, Action, AppContext, ClickEvent, EventEmitter, FocusableView,- FontStyle, FontWeight, Hsla, InteractiveElement as _, IntoElement, KeyContext,- ParentElement as _, Render, ScrollHandle, Styled, Subscription, Task, TextStyle, View,- ViewContext, VisualContext as _, WhiteSpace, WindowContext,+ FontStyle, Hsla, InteractiveElement as _, IntoElement, KeyContext, ParentElement as _, Render,+ ScrollHandle, Styled, Subscription, Task, TextStyle, View, ViewContext, VisualContext as _,+ WhiteSpace, WindowContext,};use project::{search::SearchQuery,@@ -116,7 +116,7 @@ impl BufferSearchBar {font_family: settings.buffer_font.family.clone(),font_features: settings.buffer_font.features.clone(),font_size: rems(0.875).into(),- font_weight: FontWeight::NORMAL,+ font_weight: settings.buffer_font.weight,font_style: FontStyle::Normal,line_height: relative(1.3),background_color: None,