From ecf179df0c195da6f36825e133f4444f42b3eed7 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Fri, 24 Oct 2025 14:45:32 -0300 Subject: [PATCH] agent: Scale the agent UI and buffer font proportionally (#41121) Closes https://github.com/zed-industries/zed/issues/41094 This PR adds the `agent_buffer_font_size` settings to be scaled in the same proportion as the agent panel's UI font size, which was the only setting that was being accounted for. This is something that I forgot to do when we broke down the agent panel's font size controls into these two values. Release Notes: - agent: Fixed an issue where the agent panel's buffer and UI font size wouldn't scale proportionally. --- crates/agent_ui/src/agent_panel.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rs index e28ae2ae1563a19624ea4a0248a4dd25922455c1..afce4d31c7a424276f7ad382bad480eac0595be8 100644 --- a/crates/agent_ui/src/agent_panel.rs +++ b/crates/agent_ui/src/agent_panel.rs @@ -1059,13 +1059,21 @@ impl AgentPanel { update_settings_file(self.fs.clone(), cx, move |settings, cx| { let agent_ui_font_size = ThemeSettings::get_global(cx).agent_ui_font_size(cx) + delta; + let agent_buffer_font_size = + ThemeSettings::get_global(cx).agent_buffer_font_size(cx) + delta; + let _ = settings .theme .agent_ui_font_size .insert(theme::clamp_font_size(agent_ui_font_size).into()); + let _ = settings + .theme + .agent_buffer_font_size + .insert(theme::clamp_font_size(agent_buffer_font_size).into()); }); } else { theme::adjust_agent_ui_font_size(cx, |size| size + delta); + theme::adjust_agent_buffer_font_size(cx, |size| size + delta); } } WhichFontSize::BufferFont => { @@ -1086,9 +1094,11 @@ impl AgentPanel { if action.persist { update_settings_file(self.fs.clone(), cx, move |settings, _| { settings.theme.agent_ui_font_size = None; + settings.theme.agent_buffer_font_size = None; }); } else { theme::reset_agent_ui_font_size(cx); + theme::reset_agent_buffer_font_size(cx); } }