Move font size adjustment code to the theme crate
This commit is contained in:
parent
258723566f
commit
42eca3048f
10 changed files with 69 additions and 56 deletions
|
@ -7446,7 +7446,7 @@ fn build_style(
|
|||
let font_id = font_cache
|
||||
.select_font(font_family_id, &font_properties)
|
||||
.unwrap();
|
||||
let font_size = settings::font_size_for_setting(settings.buffer_font_size, cx);
|
||||
let font_size = settings.buffer_font_size(cx);
|
||||
EditorStyle {
|
||||
text: TextStyle {
|
||||
color: settings.theme.editor.text_color,
|
||||
|
@ -7619,9 +7619,7 @@ pub fn diagnostic_block_renderer(diagnostic: Diagnostic, is_valid: bool) -> Rend
|
|||
let settings = settings::get::<ThemeSettings>(cx);
|
||||
let theme = &settings.theme.editor;
|
||||
let style = diagnostic_style(diagnostic.severity, is_valid, theme);
|
||||
let font_size = (style.text_scale_factor
|
||||
* settings::font_size_for_setting(settings.buffer_font_size, cx))
|
||||
.round();
|
||||
let font_size = (style.text_scale_factor * settings.buffer_font_size(cx)).round();
|
||||
Flex::column()
|
||||
.with_children(highlighted_lines.iter().map(|(line, highlights)| {
|
||||
Label::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue