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:
parent
6276281e8a
commit
e19339bc1d
22 changed files with 67 additions and 52 deletions
|
@ -3027,7 +3027,7 @@ mod tests {
|
|||
|
||||
impl Render for DraggedTab {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
let ui_font = ThemeSettings::get_global(cx).ui_font.family.clone();
|
||||
let ui_font = ThemeSettings::get_global(cx).ui_font.clone();
|
||||
let label = self.item.tab_content(
|
||||
TabContentParams {
|
||||
detail: Some(self.detail),
|
||||
|
@ -3040,6 +3040,6 @@ impl Render for DraggedTab {
|
|||
.selected(self.is_active)
|
||||
.child(label)
|
||||
.render(cx)
|
||||
.font_family(ui_font)
|
||||
.font(ui_font)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4123,10 +4123,7 @@ impl Render for Workspace {
|
|||
};
|
||||
let (ui_font, ui_font_size) = {
|
||||
let theme_settings = ThemeSettings::get_global(cx);
|
||||
(
|
||||
theme_settings.ui_font.family.clone(),
|
||||
theme_settings.ui_font_size,
|
||||
)
|
||||
(theme_settings.ui_font.clone(), theme_settings.ui_font_size)
|
||||
};
|
||||
|
||||
let theme = cx.theme().clone();
|
||||
|
@ -4139,7 +4136,7 @@ impl Render for Workspace {
|
|||
.size_full()
|
||||
.flex()
|
||||
.flex_col()
|
||||
.font_family(ui_font)
|
||||
.font(ui_font)
|
||||
.gap_0()
|
||||
.justify_start()
|
||||
.items_start()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue