Use defaults for unchanged TextStyle
fields (#14918)
This PR updates a number of spots where we were setting all of the `TextStyle` fields even if we were not changing the values from the defaults. We now use `..Default::default()`. Release Notes: - N/A
This commit is contained in:
parent
e8bcc412b5
commit
cb2c334358
11 changed files with 36 additions and 87 deletions
|
@ -13,8 +13,8 @@ use editor::{
|
|||
use fs::Fs;
|
||||
use futures::{channel::mpsc, SinkExt, StreamExt};
|
||||
use gpui::{
|
||||
AppContext, Context, EventEmitter, FocusHandle, FocusableView, FontStyle, FontWeight, Global,
|
||||
Model, ModelContext, Subscription, Task, TextStyle, UpdateGlobal, View, WeakView, WhiteSpace,
|
||||
AppContext, Context, EventEmitter, FocusHandle, FocusableView, FontWeight, Global, Model,
|
||||
ModelContext, Subscription, Task, TextStyle, UpdateGlobal, View, WeakView,
|
||||
};
|
||||
use language::Buffer;
|
||||
use language_model::{LanguageModelRequest, LanguageModelRequestMessage, Role};
|
||||
|
@ -946,12 +946,8 @@ impl PromptEditor {
|
|||
font_features: settings.ui_font.features.clone(),
|
||||
font_size: rems(0.875).into(),
|
||||
font_weight: FontWeight::NORMAL,
|
||||
font_style: FontStyle::Normal,
|
||||
line_height: relative(1.3),
|
||||
background_color: None,
|
||||
underline: None,
|
||||
strikethrough: None,
|
||||
white_space: WhiteSpace::Normal,
|
||||
..Default::default()
|
||||
};
|
||||
EditorElement::new(
|
||||
&self.editor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue