From 515122c54dd97784b51624d8b8694bd28abeff9b Mon Sep 17 00:00:00 2001 From: Remco Smits Date: Wed, 3 Jul 2024 18:20:05 +0200 Subject: [PATCH] Clean up debug panel code For now we only support debugger to be positioned on the bottom. --- crates/debugger_ui/src/debugger_panel.rs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/crates/debugger_ui/src/debugger_panel.rs b/crates/debugger_ui/src/debugger_panel.rs index 78be37d634ffe8..b2e4d3e6312d63 100644 --- a/crates/debugger_ui/src/debugger_panel.rs +++ b/crates/debugger_ui/src/debugger_panel.rs @@ -32,9 +32,6 @@ actions!( ); pub struct DebugPanel { - pub position: DockPosition, - pub zoomed: bool, - pub active: bool, pub focus_handle: FocusHandle, pub size: Pixels, _subscriptions: Vec, @@ -70,9 +67,6 @@ impl DebugPanel { }); Self { - position: DockPosition::Bottom, - zoomed: false, - active: false, focus_handle: cx.focus_handle(), size: px(300.), _subscriptions, @@ -470,18 +464,14 @@ impl Panel for DebugPanel { } fn position(&self, _cx: &WindowContext) -> DockPosition { - self.position + DockPosition::Bottom } - fn position_is_valid(&self, _position: DockPosition) -> bool { - true + fn position_is_valid(&self, position: DockPosition) -> bool { + position == DockPosition::Bottom } - fn set_position(&mut self, position: DockPosition, _cx: &mut ViewContext) { - self.position = position; - // TODO: - // cx.update_global::(f) - } + fn set_position(&mut self, _position: DockPosition, _cx: &mut ViewContext) {} fn size(&self, _cx: &WindowContext) -> Pixels { self.size