diff --git a/crates/ui2/src/settings.rs b/crates/ui2/src/settings.rs index 995da199cf..d7ace0a083 100644 --- a/crates/ui2/src/settings.rs +++ b/crates/ui2/src/settings.rs @@ -1,9 +1,7 @@ use std::ops::Deref; -use std::sync::Arc; use gpui3::{ - rems, AbsoluteLength, AnyElement, BorrowAppContext, Bounds, Interactive, LayoutId, Pixels, - WindowContext, + rems, AbsoluteLength, AnyElement, BorrowAppContext, Bounds, LayoutId, Pixels, WindowContext, }; use crate::prelude::*; @@ -149,32 +147,3 @@ impl Element for WithSettings { }); } } - -impl Interactive for WithSettings { - fn listeners(&mut self) -> &mut gpui3::EventListeners { - self.child.listeners() - } - - fn on_mouse_down( - mut self, - button: gpui3::MouseButton, - handler: impl Fn(&mut Self::ViewState, &gpui3::MouseDownEvent, &mut ViewContext) - + Send - + Sync - + 'static, - ) -> Self - where - Self: Sized, - { - println!("WithSettings on_mouse_down"); - - let settings = self.settings.clone(); - - self.listeners() - .mouse_down - .push(Arc::new(move |view, event, bounds, phase, cx| { - cx.with_global(settings.clone(), |cx| handler(view, event, cx)) - })); - self - } -}