Remove ui font fields from settings
This commit is contained in:
@@ -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)
|
||||
};
|
||||
|
||||
@@ -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(),
|
||||
)
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user