Move font size adjustment code to the theme crate

This commit is contained in:
Max Brunsfeld 2023-05-17 15:56:32 -07:00
parent 258723566f
commit 42eca3048f
10 changed files with 69 additions and 56 deletions

View file

@ -16,7 +16,6 @@ use gpui::{
use itertools::Itertools;
use language::CursorShape;
use ordered_float::OrderedFloat;
use settings::font_size_for_setting;
use terminal::{
alacritty_terminal::{
ansi::{Color as AnsiColor, Color::Named, CursorShape as AlacCursorShape, NamedColor},
@ -531,12 +530,9 @@ impl Element<TerminalView> for TerminalElement {
let tooltip_style = settings.theme.tooltip.clone();
let font_cache = cx.font_cache();
let font_size = font_size_for_setting(
terminal_settings
.font_size
.unwrap_or(settings.buffer_font_size),
cx,
);
let font_size = terminal_settings
.font_size(cx)
.unwrap_or(settings.buffer_font_size(cx));
let font_family_name = terminal_settings
.font_family
.as_ref()