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
|
@ -89,13 +89,13 @@ pub fn tooltip_container<V>(
|
|||
cx: &mut ViewContext<V>,
|
||||
f: impl FnOnce(Div, &mut ViewContext<V>) -> Div,
|
||||
) -> impl IntoElement {
|
||||
let ui_font = ThemeSettings::get_global(cx).ui_font.family.clone();
|
||||
let ui_font = ThemeSettings::get_global(cx).ui_font.clone();
|
||||
|
||||
// padding to avoid tooltip appearing right below the mouse cursor
|
||||
div().pl_2().pt_2p5().child(
|
||||
v_flex()
|
||||
.elevation_2(cx)
|
||||
.font_family(ui_font)
|
||||
.font(ui_font)
|
||||
.text_ui(cx)
|
||||
.text_color(cx.theme().colors().text)
|
||||
.py_1()
|
||||
|
|
|
@ -169,10 +169,10 @@ pub struct Headline {
|
|||
|
||||
impl RenderOnce for Headline {
|
||||
fn render(self, cx: &mut WindowContext) -> impl IntoElement {
|
||||
let ui_font = ThemeSettings::get_global(cx).ui_font.family.clone();
|
||||
let ui_font = ThemeSettings::get_global(cx).ui_font.clone();
|
||||
|
||||
div()
|
||||
.font_family(ui_font)
|
||||
.font(ui_font)
|
||||
.line_height(self.size.line_height())
|
||||
.text_size(self.size.size())
|
||||
.text_color(cx.theme().colors().text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue