diff --git a/crates/story/src/lib.rs b/crates/story/src/lib.rs index b2e6b782..d9383a0c 100644 --- a/crates/story/src/lib.rs +++ b/crates/story/src/lib.rs @@ -468,7 +468,7 @@ impl Panel for StoryContainer { .contains(&self.name) } - fn set_zoomed(&self, zoomed: bool, _window: &Window, _cx: &App) { + fn set_zoomed(&mut self, zoomed: bool, _window: &mut Window, _cx: &mut App) { println!("panel: {} zoomed: {}", self.name, zoomed); } diff --git a/crates/ui/src/dock/panel.rs b/crates/ui/src/dock/panel.rs index 78c72fbe..ebc8fc89 100644 --- a/crates/ui/src/dock/panel.rs +++ b/crates/ui/src/dock/panel.rs @@ -102,7 +102,7 @@ pub trait Panel: EventEmitter + Render + Focusable { /// This method will be called when the panel is zoomed or unzoomed. /// /// Only current Panel will touch this method. - fn set_zoomed(&self, zoomed: bool, window: &Window, cx: &App) {} + fn set_zoomed(&mut self, zoomed: bool, window: &mut Window, cx: &mut App) {} /// The addition popup menu of the panel, default is `None`. fn popup_menu(&self, this: PopupMenu, window: &Window, cx: &App) -> PopupMenu {