Store whether a panel is zoomed in the panel itself

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-05-17 17:51:11 +02:00
parent f097444546
commit 05fb051924
4 changed files with 24 additions and 11 deletions

View file

@ -207,6 +207,10 @@ impl Panel for TerminalPanel {
matches!(event, Event::ZoomOut)
}
fn is_zoomed(&self, cx: &WindowContext) -> bool {
self.pane.read(cx).is_zoomed()
}
fn set_zoomed(&mut self, zoomed: bool, cx: &mut ViewContext<Self>) {
self.pane.update(cx, |pane, cx| pane.set_zoomed(zoomed, cx));
}