Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent_ui: Show the agent panel's full screen button as toggled (#62041)
Vlad Gaevsky66ed3027b8ca
diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rsindex a45538cfa0d..036482afe82 100644--- a/crates/agent_ui/src/agent_panel.rs+++ b/crates/agent_ui/src/agent_panel.rs@@ -6051,21 +6051,14 @@ impl AgentPanel {};let is_full_screen = self.is_zoomed(window, cx);- let (icon_id, icon_name, tooltip_text) = if is_full_screen {- (- "disable-full-screen",- IconName::Minimize,- "Disable Full Screen",- )+ let (icon_name, tooltip_text) = if is_full_screen {+ (IconName::Minimize, "Disable Full Screen")} else {- (- "enable-full-screen",- IconName::Maximize,- "Enable Full Screen",- )+ (IconName::Maximize, "Enable Full Screen")};- let full_screen_button = IconButton::new(icon_id, icon_name)+ let full_screen_button = IconButton::new("toggle-full-screen", icon_name).icon_size(IconSize::Small)+ .toggle_state(is_full_screen).tooltip(move |_, cx| Tooltip::for_action(tooltip_text, &ToggleZoom, cx)).on_click(cx.listener(move |this, _, window, cx| {this.toggle_zoom(&ToggleZoom, window, cx);