Allow UI font weight to be assigned in settings (#12333)

Release Notes:

- Added the ability to configure the weight of your UI font in standard
CSS weight units from 0 to 900.
This commit is contained in:
Nathan Sobo 2024-05-26 23:06:58 -06:00 committed by GitHub
parent 6276281e8a
commit e19339bc1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 67 additions and 52 deletions

View file

@ -3,7 +3,7 @@ use crate::{
AssistantChat, CompletionProvider,
};
use editor::{Editor, EditorElement, EditorStyle};
use gpui::{AnyElement, FontStyle, FontWeight, ReadGlobal, TextStyle, View, WeakView, WhiteSpace};
use gpui::{AnyElement, FontStyle, ReadGlobal, TextStyle, View, WeakView, WhiteSpace};
use settings::Settings;
use theme::ThemeSettings;
use ui::{popover_menu, prelude::*, ButtonLike, ContextMenu, Divider, TextSize, Tooltip};
@ -78,7 +78,7 @@ impl RenderOnce for Composer {
font_family: settings.buffer_font.family.clone(),
font_features: settings.buffer_font.features.clone(),
font_size: font_size.into(),
font_weight: FontWeight::NORMAL,
font_weight: settings.buffer_font.weight,
font_style: FontStyle::Normal,
line_height: line_height.into(),
background_color: None,