dock: Panel trait set_active with mutable window and cx (#659)

This commit is contained in:
Floyd Wang 2025-02-25 14:15:42 +08:00 committed by GitHub
parent 8edd80d5ee
commit f75f96f135
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -472,7 +472,7 @@ impl Panel for StoryContainer {
println!("panel: {} zoomed: {}", self.name, zoomed);
}
fn set_active(&mut self, active: bool, _window: &Window, _cx: &App) {
fn set_active(&mut self, active: bool, _window: &mut Window, _cx: &mut App) {
println!("panel: {} active: {}", self.name, active);
}

View file

@ -95,7 +95,7 @@ pub trait Panel: EventEmitter<PanelEvent> + Render + Focusable {
/// This method will be called when the panel is active or inactive.
///
/// The last_active_panel and current_active_panel will be touched when the panel is active.
fn set_active(&mut self, active: bool, window: &Window, cx: &App) {}
fn set_active(&mut self, active: bool, window: &mut Window, cx: &mut App) {}
/// Set zoomed state of the panel.
///