Break typography styles out of StyledExt
(#11013)
- Centralizes typography-related UI styles and methods in `styles/typography.rs` - Breaks the typography-related styles out of `StyledExt`. This means we add a `StyledTypography` trait – this should more or less be an invisible change as we publish it in the prelude. - adds the ability to easily grab the UI or Buffer font sizes (`ui_font_size`, `buffer_font_size`) with `TextSize::UI`, `TextSize::Editor` Release Notes: - N/A
This commit is contained in:
parent
4c780568bc
commit
366d7e7728
11 changed files with 100 additions and 84 deletions
|
@ -18,7 +18,7 @@ use project::{search::SearchQuery, Completion};
|
|||
use settings::Settings;
|
||||
use std::{ops::Range, sync::Arc, time::Duration};
|
||||
use theme::ThemeSettings;
|
||||
use ui::{prelude::*, UiTextSize};
|
||||
use ui::{prelude::*, TextSize};
|
||||
|
||||
use crate::panel_settings::MessageEditorSettings;
|
||||
|
||||
|
@ -523,7 +523,7 @@ impl Render for MessageEditor {
|
|||
},
|
||||
font_family: settings.ui_font.family.clone(),
|
||||
font_features: settings.ui_font.features,
|
||||
font_size: UiTextSize::Small.rems().into(),
|
||||
font_size: TextSize::Small.rems(cx).into(),
|
||||
font_weight: FontWeight::NORMAL,
|
||||
font_style: FontStyle::Normal,
|
||||
line_height: relative(1.3),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue