ui: Track changes to UI font size made via actions with settings (#23265)
Fixes #5380 Closes #5380 Release Notes: - Font size changes made with actions are now persisted in user settings
This commit is contained in:
parent
24495f09f9
commit
795376cb07
11 changed files with 89 additions and 156 deletions
|
@ -551,7 +551,7 @@ impl TerminalElement {
|
|||
|
||||
fn rem_size(&self, cx: &WindowContext) -> Option<Pixels> {
|
||||
let settings = ThemeSettings::get_global(cx).clone();
|
||||
let buffer_font_size = settings.buffer_font_size(cx);
|
||||
let buffer_font_size = settings.buffer_font_size();
|
||||
let rem_size_scale = {
|
||||
// Our default UI font size is 14px on a 16px base scale.
|
||||
// This means the default UI font size is 0.875rems.
|
||||
|
@ -608,7 +608,7 @@ impl Element for TerminalElement {
|
|||
let hitbox = hitbox.unwrap();
|
||||
let settings = ThemeSettings::get_global(cx).clone();
|
||||
|
||||
let buffer_font_size = settings.buffer_font_size(cx);
|
||||
let buffer_font_size = settings.buffer_font_size();
|
||||
|
||||
let terminal_settings = TerminalSettings::get_global(cx);
|
||||
|
||||
|
@ -635,8 +635,7 @@ impl Element for TerminalElement {
|
|||
let line_height = terminal_settings.line_height.value();
|
||||
let font_size = terminal_settings.font_size;
|
||||
|
||||
let font_size =
|
||||
font_size.map_or(buffer_font_size, |size| theme::adjusted_font_size(size, cx));
|
||||
let font_size = font_size.unwrap_or(buffer_font_size);
|
||||
|
||||
let theme = cx.theme().clone();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue