agent: Add menu item in the panel menu for zooming in feature (#30554)
Release Notes: - agent: Added a menu item in the panel's menu for the zooming in/out feature.
This commit is contained in:
parent
739236e968
commit
41b0a5cf10
1 changed files with 8 additions and 1 deletions
|
@ -1648,6 +1648,12 @@ impl AgentPanel {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let zoom_in_label = if self.is_zoomed(window, cx) {
|
||||||
|
"Zoom Out"
|
||||||
|
} else {
|
||||||
|
"Zoom In"
|
||||||
|
};
|
||||||
|
|
||||||
let agent_extra_menu = PopoverMenu::new("agent-options-menu")
|
let agent_extra_menu = PopoverMenu::new("agent-options-menu")
|
||||||
.trigger_with_tooltip(
|
.trigger_with_tooltip(
|
||||||
IconButton::new("agent-options-menu", IconName::Ellipsis)
|
IconButton::new("agent-options-menu", IconName::Ellipsis)
|
||||||
|
@ -1734,7 +1740,8 @@ impl AgentPanel {
|
||||||
|
|
||||||
menu = menu
|
menu = menu
|
||||||
.action("Rules…", Box::new(OpenRulesLibrary::default()))
|
.action("Rules…", Box::new(OpenRulesLibrary::default()))
|
||||||
.action("Settings", Box::new(OpenConfiguration));
|
.action("Settings", Box::new(OpenConfiguration))
|
||||||
|
.action(zoom_in_label, Box::new(ToggleZoom));
|
||||||
menu
|
menu
|
||||||
}))
|
}))
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue