Remove ui font fields from settings

This commit is contained in:
Max Brunsfeld
2021-08-26 17:12:56 -07:00
parent 38d0258049
commit 1489c865e7
6 changed files with 25 additions and 47 deletions
-2
View File
@@ -531,9 +531,7 @@ mod tests {
let settings = Settings {
buffer_font_family: font_cache.load_family(&["Helvetica"]).unwrap(),
ui_font_family: font_cache.load_family(&["Helvetica"]).unwrap(),
buffer_font_size: 12.0,
ui_font_size: 12.0,
tab_size: 4,
..cx.read(Settings::test)
};
+1 -2
View File
@@ -162,11 +162,10 @@ impl FileFinder {
.with_child(
Container::new(
LineBox::new(
settings.ui_font_family,
settings.ui_font_size,
Svg::new("icons/file-16.svg")
.with_color(style.label.text.color)
.boxed(),
style.label.text.clone(),
)
.boxed(),
)
-4
View File
@@ -11,8 +11,6 @@ pub struct Settings {
pub buffer_font_family: FamilyId,
pub buffer_font_size: f32,
pub tab_size: usize,
pub ui_font_family: FamilyId,
pub ui_font_size: f32,
pub theme: Arc<Theme>,
}
@@ -42,8 +40,6 @@ impl Settings {
buffer_font_family: font_cache.load_family(&["Fira Code", "Monaco"])?,
buffer_font_size: 14.0,
tab_size: 4,
ui_font_family: font_cache.load_family(&["SF Pro", "Helvetica"])?,
ui_font_size: 12.0,
theme,
})
}
+2 -2
View File
@@ -179,8 +179,8 @@ impl Pane {
let settings = self.settings.borrow();
let theme = &settings.theme;
let line_height = cx.font_cache().line_height(
cx.font_cache().default_font(settings.ui_font_family),
settings.ui_font_size,
theme.workspace.tab.label.text.font_id,
theme.workspace.tab.label.text.font_size,
);
let mut row = Flex::row();
+3 -2
View File
@@ -61,9 +61,10 @@ impl Sidebar {
pub fn render(&self, settings: &Settings, cx: &AppContext) -> ElementBox {
let side = self.side;
let theme = &settings.theme;
let line_height = cx.font_cache().line_height(
cx.font_cache().default_font(settings.ui_font_family),
settings.ui_font_size,
theme.workspace.tab.label.text.font_id,
theme.workspace.tab.label.text.font_size,
);
Container::new(