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
|
@ -133,7 +133,7 @@ pub fn init(cx: &mut AppContext) {
|
|||
};
|
||||
|
||||
let theme = ThemeSettings::get_global(cx);
|
||||
let height = theme.buffer_font_size(cx) * theme.buffer_line_height.value();
|
||||
let height = theme.buffer_font_size() * theme.buffer_line_height.value();
|
||||
|
||||
let desired_size = if let Some(count) = Vim::take_count(cx) {
|
||||
height * count
|
||||
|
@ -151,11 +151,11 @@ pub fn init(cx: &mut AppContext) {
|
|||
};
|
||||
let Ok(width) = cx
|
||||
.text_system()
|
||||
.advance(font_id, theme.buffer_font_size(cx), 'm')
|
||||
.advance(font_id, theme.buffer_font_size(), 'm')
|
||||
else {
|
||||
return;
|
||||
};
|
||||
let height = theme.buffer_font_size(cx) * theme.buffer_line_height.value();
|
||||
let height = theme.buffer_font_size() * theme.buffer_line_height.value();
|
||||
|
||||
let (axis, amount) = match action.0 {
|
||||
ResizeIntent::Lengthen => (Axis::Vertical, height),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue